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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unflattening FXP array yields incorrect results

Solved!
Go to solution

Hello,

 

I am trying to send some data from my RIO to the PC via Ethernet.

To do this, I am flattening the data (an array of FXP numbers) to String on the RIO.

On the PC, I am unflattening the data, but obtaining different results.

 

Any idea what's wrong?

 

Attached files:

Voltages.vi - PC code

DMARead - code on RIO.

 

Thanks in advance!

 

Kyle

Download All
0 Kudos
Message 1 of 4
(2,340 Views)
Solution
Accepted by topic author Kyle_UCT
Hi Kyle, Thank you for your post and welcome to the NI forums. The first suggestion I would make is, regarding the FXP data you are passing around, have you made sure that the word and integer lengths are the same on both sides? If these are different you would expect the data to be different. Thanks,
Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 4
(2,338 Views)

Eden is right. You're flattening FXP<+,16,3> data on the RIO, but you unflatten the data to FXP<+-,64,32> on the host. This can not work.

 

0 Kudos
Message 3 of 4
(2,329 Views)

Thank you very much, Eden_S and dan_u. That fixed the problem.

0 Kudos
Message 4 of 4
(2,321 Views)