04-19-2010 09:24 PM
Windows 7 Professional
LabVIEW 2009 SP1, RT
I ran into this nasty issue yesterday and am looking for some help (please).
I used the Scan Engine along with User Variables to push filtered data from FPGA C Series modules to the RTOS.
When the Fixed Point data from the User Variables was read in the RTOS it was converted using the To Double Precision Float primitive.
The result was that positive numbers were output correct but negative numbers became corrupted.
Further testing revealed the following:
Below is a block diagram of the methods I tried:
The Front Panel containing the results is below.
As you can see the negative Fixed Points are always converting incorrectly to a DBL.
However, the hack I did produces the correct results
Has anyone seen this before?
Is this a known issue?
Can it be replicated?
We have tried this on two systems thus far, and it was replicated in both cases
As a note, I did a similar project in LabVIEW 2009 (not SP1) and I did not have this issue (although I did have this one)
Cheers
-JG
Solved! Go to Solution.
04-20-2010 10:53 AM
jg-code,
Thanks for the detailed explanation of your issue and the tests you've done! I apologize that you are encountering this issue, but luckily, it is a known issue.
You've found CAR (Corrective Action Request) #178392, "If someone uses the user defined variable with his I/O channel on FPGA in a different configuration from default fixed point data type which is signed 64 bit word length and 32 bit integer, the value converts to a wrong double value on RT whenever the fixed point value becomes negative."
The workarounds are:
04-20-2010 07:39 PM
Thanks for the info Ben.
I like the idea of using the default 64 bit workaround, as the FXP-Int-FXP conversion seems to be a little expensive on the RT
Unfortunately I am using NI-RIO 3.4 (with LV2009 SP1)
[As a side note - I did not see this issue with NI-RIO 3.2.1 (with LV2009)]
Also is there an RSS to subscribe to, for CARs?
Cheers
-JG
04-21-2010 05:37 PM
jg-code,
I'm sorry to hear you are still having that issue in NI-RIO 3.4! There is no CAR RSS feed, but you can check the known issues list for various products as they are updated to reflect new information.
For Example: Known Issues and Bug Fixes for LabVIEW 2009 Real-Time Module
04-21-2010 07:06 PM
Thanks,
Have/Will you file a CAR for this or should I do?
Cheers
-JG
04-22-2010 10:13 AM
jg-code,
The CAR has allready been filed for this issue. What I will do is verify that I can replicate the issue with RIO 3.4 and update the CAR to reflect the current situation.
04-22-2010 07:25 PM
Ok, I figured if the old CAR was closed, so you would need to open another.
Anyways, please let me know what you find.
Thanks for all your help
-JG
12-01-2013 05:36 AM
Necroing this thread--- looks like the bug popped backup again. NI RIO 12.1, CRIO 9074
12-02-2013 02:12 PM
MarkCG
Does the workaround mentioned above work for this case?
Frank R.
12-02-2013 03:43 PM
Hi Frank, didn't try it, I just ended up coercing the FXP number to be greater than 0, since I don't need the negative values anyways.