Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert decimal number to binary and binary number is given on the digital outputs of the daq

I hope and I can help, I want to control the outputs of the USB-6008 DAQ through adecimal number, I first want to enter a decimal number to binary and convert this binary number out by the DAQ, I have parties and I have drawn on examples I can not find a way to control the output by simply introducing the decimal number, thanks! 

0 Kudos
Message 1 of 3
(3,451 Views)

You want to control the analog or digital outputs? I'm not sure that having parties is the way to solve your problem but for an analog output, the example called Gen Voltage Update will work. For digital output, try Write Dig Port. The control is set for hex display but that is easily changed. You don't need to do any conversion to binary.

0 Kudos
Message 2 of 3
(3,443 Views)

Good morning tavaco,

 

Here is an image about what you are asking.

 

Number to Boolean.png

 

You can do this to make your number to become a bolean array. You also can configure the Number control to have values just from 0 to 255 and as you can see the values are already Integers.

 

Now this will be the data that you are going to write, if you want to write on your 6008, you can use this example:

 

https://decibel.ni.com/content/docs/DOC-11138

 

And finally I will highly recomend you to read this tutorial about data acquisition:

 

http://zone.ni.com/devzone/cda/tut/p/id/3116

 

I hope this helps you a little bit.

 

Take care and good luck!!

Luis Elias
NI VeriStand and HIL Product Manager
0 Kudos
Message 3 of 3
(3,438 Views)