11-23-2009 01:06 AM
Solved! Go to Solution.
11-23-2009 02:02 AM - edited 11-23-2009 02:04 AM
Hi number,
have you tried something like this:
(The InitArray-function is only to define the size of the array. Change the "Array" indicator to become a control, showing 8x8 boolean switches...)
Why do you assume 8 bytes become effectivly 8 bits?
How big is your boolean array (it's not included in your vi)?
11-23-2009 02:20 AM
Hi!!
I have attached the vi. Can you implement your idea on that vi?
I am trying though...now about 8 bytes to b bits... see at other side ,I have 8 bytes waiting to read write buffer, but when I used as shown in vi , all 8 bits(boolean) are read as 8 different bytes instead of one single byte in my program.
So I want to access 64 bits that can be read as 8 different bytes..
11-23-2009 02:21 AM
11-23-2009 02:33 AM
Hi number,
your array contains 19 bits! This is your coding:
Those 19 bits are converted to zeros or ones, so you get a numeric I16 array containing 19 numbers (0 or 1). This is then converted to an array of string, each string containing either "0" or "1". Then you append all strings of the array to one string (resulting in "0111000000000100001").
To receive 8 bytes you need 64 bits, best would be 8 times 8 bits. Do as shown in my first message...
11-23-2009 02:42 AM
11-23-2009 02:50 AM - edited 11-23-2009 02:50 AM
11-23-2009 03:11 AM
To, GerdW
great man it works.
Now, how to seperate out 8 (64 bits---part into 8 groups)different controls bytes for 1-D array.. right now it is in one line...I want to fragment it so it can be more user friendly...
MS.
11-23-2009 03:15 AM - edited 11-23-2009 03:20 AM
Hi,
use a 2d array
Or:
Show 8 bits of the 1d array and hide the array index. Make a second numeric control to let the user select the byte. Set the array index using property nodes to multiples of 8 to always show "full" bytes.
11-23-2009 03:26 AM
To GerdW,
Thats ok, but can it be possible to make some of the values (say 32 bits of 64) to be enter from front panel and other values to be conditional that depends on the logic during program...so it depends on the other values...so I wanted to put a variables sized 1 byte so it can be modifeid during program run...how to use variables for this configuration...
Thanks..
MS