12-18-2017 06:43 AM
Im getting an error telling me that the "LabVIEW: RT FIFO does not exist."
In my VI on my RT Target Im creating the RT FIFO queue. And then in my top level VI on my computer Im having a while loop thats sending messages to this queue. But Im getting an error in my top level VI telling me that the queue does not exist. So how I try to read this is to first generate the RT FIFO refnum on the RT Target and save that by unflattering it to string and save it to a shared variable, and then in the top level gui Im converting it back to a refnum and try writing to the queue. See pictures below:
RT Target creates the FIFO queue.
Top Level GUI getting an error while trying to write to the RT FIFO queue.
Does somebody have any suggestion for how to solve this kind of error?
12-18-2017 12:29 PM - edited 12-18-2017 12:54 PM
If I have understood you correctly you have a VI in your RT that is reading from a FIFO and then another VI on your Host (eg. development) computer attempting to write to said FIFO? If so what you have shown should not work.
The RT FIFO reference number ("refnum") is only valid within your RT application - you can't pass this reference number to another environment (your PC host) or even another process as the number will be meaningless in that context. This is a common principle for all reference aka refnum types in LabVIEW - they are unique to the application and can't be accessed outside that context.
You need to use an alternate communication mechanism such as TCP or a framework / API that wraps around TCP (eg. AMC, Network Streams etc.). You can have a low priority loop within your RT application to read data received from the host so that it does not take time away from your real-time tasks.
I strongly recommend going through this tutorial here. It might help with an alternate strategy.