From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

wrong channel count

Solved!
Go to solution

I have a fieldpoint setup to query all channels on a DO401. This is so I can get feedback on the state of all channels.

However, when I read the output, it returns 32 instead of 16 values.

What would be causing this? I have a workaround of taking the first half of the array

 

23002i9952C5BFC23D492B

 

23004i4F88113FD51F8CFD

_____________________________
- Cheers, Ed
0 Kudos
Message 1 of 2
(5,837 Views)
Solution
Accepted by topic author yenknip

Open up the FP Read subVI and you'll see why.

 

At the heart of the subVI is a dll call that returns a Double floating point for the values.  It gets converted to a U32 integer, which is then converted to a boolean array.  Thus you wind up with a 32 element boolean array, even if your IO module doesn't have that many inputs/outputs.

 

The other thing to consider is that there are some 32 input modules out there and the same subVI has to be able to handle them.  For whatever reason, the subVI's don't try to figure out how many inputs/outputs there might be in the module to truncate the array to have only that many elements.

Message 2 of 2
(5,827 Views)