Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cdaq-9172

Solved!
Go to solution

Hi,

I'm using a cdaq-9172 with a NI 9421 input card. I want  to look at the first 4 bits as an integer and see this in the shared variable engine. Any thoghts on how I could do this? I have tried making a new Global virtual channel but can only select input, or port input. Port input is a bool and not integer.

0 Kudos
Message 1 of 4
(3,394 Views)

You will need to build your data into a boolean array and convert to a number.  Then you can turn that value into a shared variable and see the number rather than the boolean.  Hopefully this helps!

 

Boolean.jpg

Regards,


h_baker
National Instruments
Applications Engineer
Message 2 of 4
(3,372 Views)

Thanks for the input..It is working for me but I have another problem. I want this app to run when started so I used a while loop instruction. With the while loop the number does not update it stays at Zero. I can see the boolean switches working but that is all.  Any thoghts?

 

0 Kudos
Message 3 of 4
(3,345 Views)
Solution
Accepted by topic author kmarcoux

Problem solved..Was not puting everything inside the while loop.

 

Thanks for your help!!!

 

Kevin

 

0 Kudos
Message 4 of 4
(3,341 Views)