05-20-2009 05:37 PM
Hi all,
I want to do the following:
*Input a number using a numerical indicator
*Convert this number to binary
*Send in this binary number to a DAQ-Pad 6509
The DAQ Assist that I am using has 12 tasks, which selectively turn on/off ports in my DAQ-Pad. The way I am controlling this right now is that I am using an array of round LEDs as a control to tell the DAQ-Pad when to activate certain ports, but I would like to remove the LED control in place for a numerical control
I have so far been able to use number <==> boolean array to generate the binary states, but when I try to integrate with the DAQ Assist, I get an error since the DAQ Assist has 12 tasks, but the boolean array provides 32 tasks.
How can I fix this problem? Thanks!
David
05-20-2009 09:09 PM
05-21-2009 11:15 AM
Hey David,
It sounds like you can convert your numeric value to a boolean array just fine, but when you try to use this array in your DAQ Assistant it throws an error. The error sounds like the DAQ Assistant is expecting an array of 12 elements. By default, the number control is an I32 data type. So, when converted to a boolean array, the array is 32 elements long. Try changing the numeric data type to something like I8 or U8 and see if the resulting 8 element array still generates an error. You can change the numeric data type by right-clicking and selecting Representation.
Hope this helps
-Ben
05-21-2009 12:41 PM
Hi All!
Thanks for the inputs. After looking around, I found my own solution to the problem using fixed-point values. This method seems to work fine for me. Thanks once again
David