11-27-2019 04:02 AM
Hi All,
I currently have a working QMH model which I am now migrating over to cRIO-9056. The cRIO QMH will run headless but we will require a PC based application to connect to the cRIO to check its status and fire in updated parameters.
Is there a method/example where I can connect to the cRIO and inject messages (+message data) into the QMH?
Thanks in advance of any advice.
11-27-2019 05:16 AM
I don't think there's going to be examples for that, as it's pretty specific.
The problem seems to be how to communicate between the cRIO and PC, and that problem has been solved over and over again. Once you have that solution (a proof of principle) it's a matter of putting in a QMH process (no expert on QMH) on the cRIO and one on the PC. I'd say DIY TCP\IP, shared variables, network streams, ZeroMQ, are the usual suspects for setting up communications, but that's not a comprehensive list.
Divide and conquer...
11-27-2019 07:54 AM
Thanks for your input. I've been looking into network streams at the moment as it seems like you can define a message type cluster to add to the stream and then read it from the other end... Not sure if this is the correct approach for my very minor comms but will give it a blast whilst I let this discussion grow!
11-27-2019 08:07 AM
@InfernoJaffa wrote:
Thanks for your input. I've been looking into network streams at the moment as it seems like you can define a message type cluster to add to the stream and then read it from the other end... Not sure if this is the correct approach for my very minor comms but will give it a blast whilst I let this discussion grow!
That is their intent.
NS are 'closed', meaning that if they don't do exactly what you want, you can't use them. It's a take it or leave it deal. Conceptually, they are a FIFO mechanism, not a CV (current value) mechanism.
They (used to?) disrupt a timed loop synchronized with the scan engine when reconnecting.
On the up side, if they work for you, they are very convenient. No need to look further in that case.
11-27-2019 09:59 AM
What I would do is make another loop that just handles the network communications. That loop can then pass on your messages to the QMH. This allows you to not have to change the QMH at all.
Personally, I like to use the raw TCP/IP API along with the STM library. But Network Streams will do the job as well.
11-28-2019 07:58 AM
Thanks for your reply.
Novice here - I've never heard of the "TCP/IP API" protocol before so I'll try to look for some examples.
11-28-2019 10:11 AM
@InfernoJaffa wrote:
Thanks for your reply.
Novice here - I've never heard of the "TCP/IP API" protocol before so I'll try to look for some examples.
TCP/IP is the protocol, "API" probably refers to the set of functions LabVIEW provides natively.