03-05-2018 08:25 AM
I need to run the following code in LabView FPGA, hence I need to use FXP.
Everything works fine and stays at FXP until I insert the feedback node. Then the data type flips to double and it can not run on the FPGA any more:
How can I force all the internal wires to be FXP?
Thanks a lot,
Michael
Solved! Go to Solution.
03-05-2018 08:37 AM
It would be much easier to help debugging a VI instead of a picture.
Are all of the FXP controls, indicators, and constants set to the same configuration?
03-05-2018 09:13 AM
It might have to do with the order that wires were connected to the feedback node.
Try disconnecting the wire that goes from the output of the Subract to the right side of the feedback node;
then reconnect it.
03-05-2018 09:15 AM
I tried this. And it all Looks good, until I "Close the Loop" via the Feedback node. Then it swiches to double.
03-05-2018 09:20 AM
Good Point and thanks for considering...
I dont know how to edit the original post, so I append here as a reply.
03-05-2018 10:45 AM - edited 03-05-2018 10:45 AM
I was able to get it to play nice by adding a to fixed point after the feedback node ¯\_(ツ)_/¯
Can you do that in FPGA land?
03-05-2018 11:05 AM
No it is still not working, because the wire section between the Feedback node and the "to fixed-Point" is displayed as double, which is not allowed in FPGA land...
03-05-2018 11:18 AM
Did you wire the fixed point type?
03-05-2018 11:21 AM
Awesome, I think I tried every Permutation, but failed to add the constant to the fxp converter.
Thanks!
03-05-2018 12:03 PM - edited 03-05-2018 01:00 PM
Especially with FXP, it is not advisable to have all these diagram constant floating around, it makes things much harder to maintain, e.g. if you would change FXP type. (Herding cats comes to mind :D)
I would just source all the types from the same place instead. (... And if the FN should be initialized with zero, just change accordingly).
(And yes, type propagation sometimes fails, so there is probably a small bug somewhere)