Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

connect Multiple VIs with one Simulink model

Hi:

 

I am not familiar with "SIT Toolkit".  So, my comments are strictly on RT achitechture, communication interface and VI server.  I have finsihed a big project using Single Board RIO and came to following conclusion:

 

  • HDD/Memory Cost:  Shared variable and other add-on for RIO is high.  So, if your application is large you may reconsider your architechture
  • TCP/IP Communication & Control: You alternately can implement server/client using TCP/IP.  This is very fast and solid.
  • VI Server: This tools let you control specific subcomponent remotely.

 

I do not know how SIT control is implemented?  But my method is very solid.  Here is a link to some sBRIO HDD/memory statistics:

 

http://forums.ni.com/ni/board/message?board.id=280&message.id=8450#M8450

 

Best regards.

 

Nasir

0 Kudos
Message 11 of 13
(1,193 Views)

Hi Tanya,

 

Thank you very much for your help. It was clear for me from the start that there can be only one TCP connection at a time to the same model. My understanding from the DevZone article "LabVIEW Simulation Interface Toolkit" and LabVIEW Simulation Interface Toolkit User Guide was that, when an additional VI request for connection to the same model, it will be attached to the existing connection rather than creating a new one. This new VI will consumes data from the same connection with out impeding the traffic as it is depicted in “Figure 2. Connecting Multiple LabVIEW VIs and Multiple Simulink Models” (ftp://ftp.ni.com/pub/devzone/tut/userguide.pdf ).  And at the end when the last VI is stopped, it would stop the running model and closes the connection. Like COM servers are used for example. It is hard to imagine that all these references are misstatements. 

 

while it is clear that I have to use Shared variables, let me ask you one last question regarding waveform chart data again. When I bind Waveform chart to Shared Variable (Array of Double Waveform) there is data lose when it reaches the final VI (Shared Variable_LV8.6.zip). I attached a simple example to make myself clear. Do I need to send the row data to the VI instead to get the same waveform in the target VI as the wave chart shows on the Main VI (Shared Variable_LV8.6_1.zip)? How can I determine the right wait time in the target VIs while loop? Is there a better way of doing this. The VIs in the example are not yet integrated with the Main VI. Please run them separately.

 

Best Regards,  

 

Getachew

Download All
0 Kudos
Message 12 of 13
(1,192 Views)

Hi Getachew,

 

As for connecting multiple VIs simultaneously to a model, we don't believe this is possible without significantly reworking of the code underlying the SIT VIs. If this is something you would be interested in doing you could contact a National Instruments Alliance Member to help you program this functionality. If you think this is a feature we should have implemented in SIT you can file a product suggestion or contact your Field Sales Engineer.

 

As for the shared variables issue, I was a little confused by the projects you attached. Which VI is writing to the shared variable and which one is supposed to be receiving the data? I could see that all your shared variables were bound to front panel controls or indicators, even hidden ones. Network-published shared variables don't always need to be bound to front panel controls/indicators. You can drag the variables from your project onto your block diagram without having them bound to a control. This creates a shared variable node which you can read and write from.

 

I saw that you enabled time stamping on your variables. If your reader checks for new data faster than your writer provides it, you can discard duplicate data by comparing time stamps.

 

Take care!

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 13 of 13
(1,169 Views)