LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use type def cluster In RT part and PC part of RIO and transport this Cluster info over network

Hello I have just started using a Rio system (9067)

 

 

What I did is make a cluster of controls, with the same names as the real hardware would get.

 

So you have got a Control 1, Control 2, Button 1, button 2 etc on the Front pannel.

The same names are hardware inputs. in excact the same cluster. So I did make a typedef for it.

 

What I want to do is send the cluster from the Front pannel of a PC to the compac Rio and the real hardware data from the RIO to the PC front pannel. What is the best way to do this? The text above is simplified to keep it understandable but eventualy I want to send about 50 different types of data across the network like bolean, int etc in a cluster.

 

 

In the

 

 

I read the fullcrioguide and found

 

"

Hosting a large number of network variables can take considerable resources away from the CompactRIO system, so for large distributed applications, NI recommends dedicating a system to running the Shared Variable Engine.

"

 

But I also heard you can NOT send clusters over a network....

 

Please help I am new with Rio but did some programming with labview in the past

 

 

thanx for the help

0 Kudos
Message 1 of 5
(3,088 Views)

I use Network Streams to send all kinds of data between a PXI running LabVIEW RT and a PC.  One channel sends an "Event Cluster" (Event Name, Event Type, Event Time), two send QMH Messages (a cluster with a String = Message and a Variant = Data).  Works very well for me.  I would think the cRIO would also allow you to do this.

 

Bob Schor

0 Kudos
Message 2 of 5
(3,068 Views)

I found on a CRIO 9073 that shared variables were not the way to go. They ate up memory fast. Instead I used Network Streams from the Data Communications - Network Streams pallete. On another project, which has dropped off of the priority list, I use a CRIO 9063. I am using clustered data.

Another tip that I found useful is to set up a state machine with Create, Read, and Destroy for the connection. This way the system was able to reconnect to the other device when it gets disconnected and then reconnects.

I hope that this project gets back on the priority list. It was getting pretty interesting. That is life working here...

Glad to answer questions. Thanks for any KUDOS or marked solutions 😉
0 Kudos
Message 3 of 5
(3,061 Views)

Thank you for the answer!! Do you have got a example? So you do not use the? So with this:

 

 

"found on a CRIO 9073 that shared variables were not the way to go. They ate up memory fast."

 

 

You mean it is not wise to use the Shared Variable Engine? Find this confusing because Shared Variable Enginemaybe I understand it wrong.

 

Do you have got a example?

 

 

 

0 Kudos
Message 4 of 5
(3,048 Views)

No, you understand correctly. I've stopped using the Shared Variables for network communications with the CRIOs that I have. Initially I was still using one shared variable to initialize or reinitialize the streams, but with this concept I was able to even stop using that shared variable.

I've attached the testing vi that I was working on for one side. It has some dependencies that aren't included, but you should get the idea. Each side creates a network reader or writer, and when communications are lost they destroy themselves and then recreate waiting for a new connection. The vi is named testing because I have not had time to put this into production yet, but it was working well. I just had to start moving the code into the controller VIs that I had already worked up, while trying to package it so that it will move into other progams easily.

The system is designed as a temperature controller for a burner system, but it will work for levels, weights, etc... without (hopefully) too much modification.

If I can ever get back to this project I may post some more complete code, but that is about 4 projects ago that I've been pulled off of...

 

Glad to answer questions. Thanks for any KUDOS or marked solutions 😉
0 Kudos
Message 5 of 5
(3,038 Views)