Group 8 channel (binary) to octal/hexa​decimal
Hi,
Let say I have 8 channel of binary data in array and plotted to the graph. If button "Grouping" pressed, then the 9th channel will be plotted, which is in octal value (Sum of binary value at the same sample).
<Please refer to the picture attach>.
I m using HSDIO 6552 to generate and acquisite the data, and I need to group some of the acquisited data.
Problem:
I don't know how to generate the 9th channel on the graph, as shown in the attached pic. So, I m seeking help on how to "Add" the octal-value channel. Any1.. pls help.. Thanks in advance.
Attachments:
grouping.JPG 16 KB
Hi engwei,
One way to display it programmatically is to use property nodes. They allow you to change the visibility, data type, transition type, etc. of an active plot. To access the property nodes of a graph, right-click on it and select Create >> Property Node. Attached is a screenshot of a property node I used to change one of my graph plots. Let me know if you have any further questions, thanks!
Cheers,
Jonah
Applications Engineer
National Instruments
Jonah Paul
Marketing Manager, Embedded Software
Evaluate the LabVIEW RIO Platform! - ni.com/rioeval
Attachments:
digital_waveform_octal.JPG 11 KB
Similar Messages
-
Here's an animated binary and octal counter
I was inspired by the "Milliseconds.fx" code example in the NetBeans pack and coded this animated counter. I've done binary and octal so far, but I'm going to work on abstracting a base class before doing decimal and hex. I know it's not all elegant and perfect, but it was a lot of fun.
* Main.fx
* Created on Jan 7, 2009, 6:22:07 PM
import javafx.animation.Interpolator;
import javafx.animation.Timeline;
import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;
* @author Sidney Harrell
var time: Integer on replace OldValue{
binaryCounter.flip(time);
octalCounter.flip(time);
def binaryCounter = BinaryCounter{};
def octalCounter = OctalCounter{};
def timer = Timeline {
keyFrames: [
at (0s) {time => 0},
at (6000s) {time => 100000 tween Interpolator.LINEAR }
class OctalCounter extends CustomNode {
def string = ["0", "1", "2", "3", "4", "5", "6", "7"];
var digits: String[];
var octalPlaceValues: Integer[] = [
134217728
16777216, 2097152
262144,32768
4096,512, 64
8, 1];
var digitNodes: Text[];
var temp: Integer;
public function flip(time:Integer) {
if (time > octalPlaceValues[0] * 8) {
temp=time mod octalPlaceValues[0] * 8;
} else {
temp=time;
for (i in [0..9]) {
if ((temp != 0)and(temp / octalPlaceValues[i] != 0)) {
digits[i] = string[temp / octalPlaceValues];
temp = temp - octalPlaceValues[i]*(temp/octalPlaceValues[i]);
} else {
digits[i] = string[0];
public override function create(): Node {
for( i in [0..9]) {
insert string[0] into digits;
for (i in [0..9]) {
insert Text {
font: Font {
size: 24
x: 10,
y: 30
content: bind digits[i]
} into digitNodes;
return Group {
content: HBox{
spacing: 10
content:[
digitNodes
Stage {
title: "Binary Counter"
width: 450
height: 120
scene: Scene {
content: VBox {
spacing: 10;
content: [
binaryCounter
octalCounter
timer.play();
class BinaryCounter extends CustomNode {
def string = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F"
var digits: String[];
var binaryPlaceValues: Integer[] = [16384 * 2 * 2, 16384 * 2, 16384, 8192, 4096, 2048, 1024,
512, 256, 128, 64, 32, 16, 8, 4, 2, 1];
var digitNodes: Text[];
var temp: Integer;
public function flip(time:Integer) {
if (time > binaryPlaceValues[0] * 2) {
temp=time mod binaryPlaceValues[0] * 2;
} else {
temp=time;
for (i in [0..16]) {
if ((temp != 0)and(temp / binaryPlaceValues[i] != 0)) {
digits[i] = string[
temp / binaryPlaceValues[i]];
temp = temp - binaryPlaceValues[i];
} else {
digits[i] = string[0];
public override function create(): Node {
for( i in [0..16]) {
insert string[0] into digits;
for (i in [0..16]) {
insert Text {
font: Font {
size: 24
x: 10,
y: 30
content: bind digits[i]
} into digitNodes;
return Group {
content: HBox{
spacing: 10
content:[
digitNodesAs promised, completed with all four major bases.
import javafx.animation.Interpolator;
import javafx.animation.Timeline;
import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;
* @author Sidney Harrell
def binaryCounter = BinaryCounter{};
def octalCounter = OctalCounter{};
def decimalCounter = DecimalCounter{};
def hexCounter = HexCounter{};
var time: Integer on replace OldValue{
binaryCounter.flip(time);
octalCounter.flip(time);
decimalCounter.flip(time);
hexCounter.flip(time);
def timer = Timeline {
keyFrames: [
at (0s) {time => 0},
at (6000s) {time => 100000 tween Interpolator.LINEAR }
Stage {
title: "Counters"
width: 530
height: 200
scene: Scene {
content: VBox {
spacing: 10;
content: [
binaryCounter
octalCounter
decimalCounter
hexCounter
timer.play();
abstract class Counter extends CustomNode {
def digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F"];
var placeValues: Integer[];
var representation: String[];
var digitNodes: Text[];
var temp: Integer;
var base: Integer;
var places: Integer;
public function flip(time:Integer) {
if (time > placeValues[0] * base) {
temp=time mod placeValues[0] * base;
} else {
temp=time;
for (i in [0..places]) {
if ((temp != 0)and(temp / placeValues[i] != 0)) {
representation[i] = digits[temp / placeValues];
temp = temp - placeValues[i]*(temp/placeValues[i]);
} else {
representation[i] = digits[0];
class OctalCounter extends Counter {
public override function create(): Node {
base = 8;
places = 9;
placeValues = [134217728, 16777216, 2097152, 262144, 32768,
4096, 512, 64, 8, 1];
for( i in [0..places]) {insert digits[0] into representation;};
for (i in [0..6]) {insert Text {font: Font {size: 24}; x: 10, y: 30 content: digits[0]} into digitNodes;};
for (i in [0..places]) {insert Text {font: Font {size: 24}; x: 10, y: 30 content: bind representation[i]} into digitNodes;};
insert Text {font: Font {size: 24}; x: 10, y: 30 content: "octal"} into digitNodes;
return Group {content: HBox{spacing: 10 content:[digitNodes];}};
class BinaryCounter extends Counter {
public override function create(): Node {
base = 2;
places = 16;
placeValues = [16384 * 2 * 2, 16384 * 2, 16384, 8192, 4096, 2048, 1024,
512, 256, 128, 64, 32, 16, 8, 4, 2, 1];
for( i in [0..places]) {insert digits[0] into representation;};
for (i in [0..places]) {insert Text {font: Font {size: 24}; x: 10, y: 30 content: bind representation[i]} into digitNodes;};
insert Text {font: Font {size: 24}; x: 10, y: 30 content: "binary"} into digitNodes;
return Group {content: HBox{spacing: 10 content:[digitNodes];}};
class DecimalCounter extends Counter {
public override function create(): Node {
base = 10;
places = 8;
placeValues = [100000000, 10000000, 1000000, 100000, 10000, 1000,
100, 10, 1];
for( i in [0..places]) {insert digits[0] into representation;};
for (i in [0..7]) {insert Text {font: Font {size: 24}; x: 10, y: 30 content: digits[0]} into digitNodes;};
for (i in [0..places]) {insert Text {font: Font {size: 24}; x: 10, y: 30 content: bind representation[i]} into digitNodes;};
insert Text {font: Font {size: 24}; x: 10, y: 30 content: "decimal"} into digitNodes;
return Group {content: HBox{spacing: 10 content:[digitNodes];}};
class HexCounter extends Counter {
public override function create(): Node {
base = 16;
places = 6;
placeValues = [16777216, 1048576, 65536, 4096, 256, 16, 1];
for( i in [0..places]) {insert digits[0] into representation;};
for (i in [0..9]) {insert Text {font: Font {size: 24}; x: 10, y: 30 content: digits[0]} into digitNodes;};
for (i in [0..places]) {insert Text {font: Font {size: 24}; x: 10, y: 30 content: bind representation[i]} into digitNodes;};
insert Text {font: Font {size: 24}; x: 10, y: 30 content: "hex"} into digitNodes;
return Group {content: HBox{spacing: 10 content:[digitNodes];}}
Edited by: sidney.harrell on Jan 12, 2009 7:49 PM
added missing closing brace -
How do I create a group of channels for input to a AI multi point
Hi,
How do I create a group of channels for input to a AI multi point, so that I can output it to 3 different graphs.I figured out the graphs but I am not able to figure out how to create the group of channels for the input.I saw many examples where a group of channels is given as an input.hello
You have to put Daq Mx Create virtual channel.vi in a For loop. out side that u should give an array of virtual channel which ever you need to acquire. i am sending the vi in 7.0 too.
Attachments:
read_channel.vi 40 KB -
Conversion of a binary data stream to decimal numbers
Hi
I am having great difficult working out how to convert my binary data stream to decimal numbers.
The data I am reading back is in the format of a binary string, starting with the Most Significant Bit (MSB) of the first word, then the corresponding Least Significant Bit (LSB), where a word is two bytes long. A carriage return indicates message termination. The return message starts with ‘bin,’ followed by the number of bytes requested. No delimiters are used to separate the data, but a carriage return is appended onto the end of the data.
bin,<first word msb><first word lsb>...<last word lsb><CR>
e.g. bin,$ro¬z1;@*...etc
Does anybody know of any examaple vi that can help me convert this data from binary to decimal numbers?
Many Thanks
AshHi Ashley,
after getting the string you can strip the first 4 characters. After this try a typecasting to array of U16. If the numbers are not correct, you can add a swap bytes operation to the resulting array.
Message Edited by GerdW on 09-13-2006 02:46 PM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
Convert.png 2 KB -
Very Urgent - Converting Character value to Hexa Decimal value
Hi
data: lv_stsor_hex(16) type X.
p_is_ppc_comp_conf-stsor is a char 10 field ***
<b>write p_is_ppc_comp_conf-stsor to lv_stsor_hex.</b> "<-- Hex Conversion
In 4.6C version this write statement is working fine but this is obsolete in ECC 6.0
and its showing syntax error.
Can anyone tell me how to convert a 10 char length value to a hexa decimal value
which is of 16 characters length and of type hexadecimal
Thanks a lot. Points will be rewarded immediately.Hi,
Use the Function module CHAR_HEX_CONVERSION.
report zeta_hex.
data: s type string.
data: h(1) type x.
data: c(1) type c.
data: byte(2) type c.
data: length type i.
FIELD-SYMBOLS: <DUMMY>.
s = 'ThisIsAString'.
length = strlen( s ).
do length times.
byte = ( sy-index - 1 ).
c = s+byte(1).
* You can do this
ASSIGN h TO <DUMMY> TYPE 'X'.
WRITE c TO <DUMMY>.
* or you can do this
* call function 'CHAR_HEX_CONVERSION'
* exporting
* input = c
* importing
* hexstring = h.
write:/ h.
enddo.
Regards
Sudheer -
Hi ,
Is there any CLASS->METHOD which converts character values to Hexa decimal values?
I am getting a syntax error in ECC 6.0.
Please provide some example.
Thanks
Title was edited by:
Alvaro Tejada GalindoHi,
(p_is_ppc_comp_conf-stsor is 10 char field.)
data: lv_stsor_hex(16) type X.
write p_is_ppc_comp_conf-stsor to lv_stsor_hex. "<-- Hex Conversion
In 4.6C the write statement is working and the 10 char value is getting converted to a 16 length hexa field.
But in Upgrade its showing error in EPC saying that cannot write 10 char value into a hexa field. -
Properties (group and channel) added are not a numeric data type.
I am using a dataplugin to add both group and channel custom properties. The properties are both text and numeric, doubles and integers.
When I create a query in Navigator, I select the custom property using the dropdown, but the operator dropdown only has "=" or "<>". The property displayed in the Data Portal is a float number. I was having this problem when I was adding custom properties using a script. I then tried "Navigatorettings/My DataFinder/Reset/Reset Index", then repopulated my Search Area, using the dataplugin on my raw data files. At this point, all my properties only have the "=" or "<>" operator choices in the query.
So it appears that my properties are numeric in the Data Portal, but string in the Navigator Query.
In advance, thanks
Solved!
Go to Solution.Hi Bill,
could it be the properties you are talking about are already "optimized" for query?
In case yes, did you do the optimization by script like
Dim oMyDataFinderSettings
Set oMyDataFinderSettings = Navigator.ConnectDataFinder("My DataFinder").GetSettings()
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "Author_age")
And did you do this, before DataFinder has indexed some of your files?
In case yes, DataFinder has to make a guess the datatype of the property without example - so always "string" is chosen.
(If DataFinder has already indexed some(or better all) files containing the property, DataFinder will "optimze" the property in the datatype which occurs most for this property.)
In case you know the datatype of the property you are about to "optimze", you can provide this information to DataFinder
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "myText", DataTypeString)
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "myInt", DataTypeInt32)
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "myFloat", DataTypeFloat64)
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "myDate", DataTypeDate)
Stefan -
Target Group to Channel - Trying to use 2 channels when only 1 is specified
I have created a Target group and then in the marketing planner create a campaign. Under the channel I have specified Phone which is linked to creating a transaction. I activate the campaign and then choose target group to channel.
The job is scheduled and does run.... However it ends in error saying "No Mail form exist for communication channel Email"
so no transactions are saved.
I am confused as I only specified the channel to be Phone NOT email..... I do not want to send any emails for this.
Has anyone encountered this problem before and can they advise on the solution.
Many Thanks
CarolineSo is question too easy that no one wants to respond? Since the new 10.7.3 update I can see the same result on the file sharing page where it shows who's logged in. Am I the only showing 2 of the same users logged in?
I was thinking because I created users and then deleted them, and the re-created the same users that's why it's occurring. When I log in from a windows machine I only see 1 user with a SMB share. But when I log in from Mac I see 2 users with the AFP share. Both users are exactly the same.
Here's one more bit regarding this. If I log in on Mac with Lion then there are 2 duplicate users and if you wait a few minutes only 1 of duplicate users will show time. The other does not. But if I log in from a Mac with Snow Leopard then it shows 2 duplicate users as above but neither of them show any time.
I can't be the only peron having these problems can I?
So if these duplicate users were caused from me creating and deleting users, where (what file) is the user name stored?
Please someone.
Tony -
I have created a new campaign and assigned products , channels and taget group to campaign.
i have changed campaign status to ' Released'.
When i m trying to send Email to Target Group , that option was grayed out . Please le me know if i need any changes .
Regards,
Ravi kumarHi Ravi,
Can you please check for following settings are maintained
In the Campaign Screen.
Basic Data Tab
Piority : high/medium
Transfer to ERP : Generally should be unchecked
Status : Released
Campaign Element Screen
Channels Tab
Communication Medium : INT
Form for Email : ( maintain the mail form which you want to send)
Work flow task : CA1 Send target group to channel
Segmentation Tab
Maintain target Group
Go to the campaign automation screen using F5
Drag and drop the start node and element side by side and connect using connection
In the start node of the campaign automation
schedule the campaign
After starting the campaign check the status and log in the start node as well as element in the campaign automation screen.
Status should be released
Log should have completed.
Hope it helps
Please reward points if it helps.
Regards,
Madhu -
Hello
When we use the "Target Group to Channel" Job, and assign a template activity that has a product associated, this product isn't copied to the activities created for the job.
Does anyone can help me?
Best regardsI have checked SWU3 and all is OK.
WS14000060 - Send Target Group to Channel is the workflow that isn't starting.
I've checked the agent assignment and it is set as general task which is what the implementation document says to do.
Regards
David -
ASCII Repsentation of hexa decimal to jpeg format
Hi
my requirement is to convert a file which contains hexa decimal code , i want to convert into a jpeg file
can anyone suggest me how i can approach thisConvert the data to RAW format and then output the RAW (probably via a BLOB datatype) to a file...
SQL> ed
Wrote file afiedt.buf
1 WITH t AS (select '424DB6050000000000003E00000028000000C3000000' as hx from dual)
2 -- END OF TEST DATA
3 SELECT hextoraw(hx), dump(hextoraw(hx))
4* from t
5 /
HEXTORAW(HX) DUMP(HEXTORAW(HX))
424DB6050000000000003E00000028000000C3000000 Typ=23 Len=22: 66,77,182,5,0,0,0,0,0,0,62,0,0,0,40,0,0,0,195,0,0,0
SQL>Note: HexToRaw has a limit on the input size (4000 character I think) so you'll have to do it in chunks. -
JMS sender channel binary format possible?
Hi,
We're still having codepage problems from MQ to SAP via JMS.
We send text messages, the QM format name is MQSTR and the message type is datagram.
At the moment SAP development is saying:
If the XML is encoded in anything other than UTF-8, then the
javax.jms.Message object must be be a BinaryMessage and not a
TextMessage. All TextMessages are interpreted to be UTF-8
My remarks on this:
-If we send UTF-8 the data is still corrupted in the end sap system so still the adapter seems to working incorrectly
-I have the feeling that in the JMS sender channel the CCSID parameter has no influence whatsoever on the application data translation
But I want to try anything, so how would I configure a JMS (MQ) sender channel for binarymessage. It seems that the JMSMessageType parameter is only valid for receiver channels. Ok, I can image that the sending side (MQ) should set the message type but then still I think the module configuration/sequence should be different than the standard one.
Anyone a clue what this should be?
thanks
TomProblem solved...
We finally managed to send a binary file to XI.
We had to do two changes to accomplish this, first make sure when we read the file from its source directory that no automatic translation is done (remove O_TEXTDATA switch from C api on iseries).
Secondly in MQ change the message format from MQSTR meaning text message to Blanks.
The messages in MQ are not human readable anymore, but when looking at the hex codes it is proper utf-8.
Now the special characters are correct in the XI monitors and also in the receiving SAP systems.
I suspect the cause of the problem to be in the iseries only partial support for the utf-8 encoding.
a nice way to end the week.. -
The hexa decimal to decimal is not working propoerly
I'am attaching one VI where , read string after the VISA serial which is put to the hexadecimal conversion . This should give the converted decimal number at the number label. But it's not providing that. So can you send me a solution for this.
Solved!
Go to Solution.
Attachments:
conversion-2.vi 28 KBSorry, LabVIEW 7 is ancient. You are already typecasting a number to a string elsewhere, so you simply need to do the reverse: typecast the string to a U8 constant.
Create a U8 diagram constant bu placing a numeric diagram constant and setting the representation to U8 (right-click...representation). Wire that as type as follows: (read string is set to hex display, but that is just cosmetic)
LabVIEW Champion . Do more with less code and in less time .
Attachments:
castString.png 5 KB -
Hex decimal n.o to integer conversion?
how to convert 1 byte hex n.o in decimal form to the decimal integer of of 8 bit data .
Solved!
Go to Solution.Hi,
You can use the Hexadecimal to Number fucntion. This is available in - Programming>String>String/Number Conversion.
Alternatively you can search for hexadecimal to number conversion.
Regards,
Kanchan Bhakoo
Applications Engineer | National Instruments -
Convert between binary and signed/unsigned decimal numbers
Hi all,
Has anyone written a code to convert:
binary number --> signed decimal
binary number --> unsiged decimal
signed decimal --> binary
unsigned decimal --> binary
Please help! I'm confusing.http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html
See the methods parseInt and toBinaryString.
Please help! I'm confusing. You are, aren't you?
(Sorry, couldn't resist...)
Maybe you are looking for
-
How to Update a particular cell in Excel with its specific cell Name?
{color:#000080}Hi, I have connected my Java program to Excel using JDBC ODBC connection and also I am able to read/write data to Excel currently. In my write code, I have updated the data in particular Excel cells by using conditions in "where" claus
-
Hi All, I have been trying to use FM MD_SALES_ORDER_STATUS_REPORT to get the Total Delay, Unit of delay and Icon delay from the MD4C report. The FM runs properly with valid data provided but for any input I have not been able to get the ET_MLDELAY t
-
Help = RFBILA00 - how to insert new GL code?
Dear all, my user claim that some of her GL code does not inserted in sequnce of where it should be..any idea how to add in those left out GL code? thanks
-
How often to restart UCCX services?
Hi, Is there Cisco documentation on how often services should be restarted, or the entire cluster be restarted? The reason why I ask is that we have services running for 588 days since the deployment of our UCCX cluster. I have restarted various serv
-
NEWEST FIRMWARE FOR NOKIA 6230i
HI THERE CAN ANYONE TELL ME WHAT IS THE NEWEST FIRMWARE FOR THE NOKIA 6230i BEFORE I GO AND GET RIPPED OF . I DONT WANT TO GET MY FIRMWARE UPDATED SOMEWHERE JUST TO FIND OUT THAT THIS ISNT THE NEWEST RELEASE. HELP HELP HELP.... IT LOOKS LIKE I AM GOI