LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Verification Communication RT HOST

Solved!
Go to solution

Bonjour,

 

Je cherche une astuce pour vérifier la bonne communication entre le Crio et le HOST ( via l'interface utilisateur), pendant un essai pour prévenir l'opérateur ou arrêter un actionneur.

Par exemple savoir quand la communication est coupé ( câble débranché , plus de batterie pc ....).

 

Je pensais utilisé une variable partagé (boolean) qui ferait le lien entre le RT et le HOST, mais je ne suis pas sur de savoir quand la variable partagée ne communique plus.

 

Avez vous une méthode qui fonctionne 🙂

Merci.

0 Kudos
Message 1 of 4
(199 Views)
Solution
Accepted by topic author maybebis

Shared variables are not ideal since they are not really connection based. As long as the server itself is not down, you are not able to detect that anything is wrong.

 

Two network streams (reader/writer) (or if you want to go all low level, your own TCP server/client) works more reliably. If you do some regular communication on this channel you can quickly detect if the connection is down or the cRIO went down. And if you implement a watchdog in the FPGA that is triggered from the RT regularly you can even make the cRIO restart from the FPGA when the RT system goes down (happened to me yesterday when trying to read a huge data log file that exhausted the available memory on the controller).

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 4
(191 Views)
Solution
Accepted by topic author maybebis
 

 

 

Thank you for your response and for sharing your experience.

0 Kudos
Message 3 of 4
(183 Views)
Solution
Accepted by topic author maybebis

Hi bis,

 


@maybebis wrote:

Hello,

I'm looking for a way to verify proper communication between the Crio and the HOST (via the user interface) during a test, to alert the operator or stop an actuator.

For example, to know when communication is interrupted (cable unplugged, PC battery dead, etc.).

I was thinking of using a shared variable (boolean) that would link the RT and the HOST, but I'm not sure how to determine when the shared variable stops communicating.

Do you have a working method?

Thanks.


Please ask in English to help us to help you (or use the French regional board)…

 

To detect communication interruptions usually "watchdog" concepts are used:

  • the client will send a value that changes with time, like toggling a boolean value on and off: the server can detect those changes or handle appropriately when there is no change in the value
  • with CAN messages sometimes an AliveCounter is used: each message counts up a value (most often a byte) from 0 to 255. The receiver can check for new messages (different AliveCounter value), missing messages (incerements different to 1) or no new messages (no change in AliveCounter)

A shared variable brings its own overhead and introduces some delays as you forward the network communication to a different software layer. I usually prefer my own routines using TCP or UDP to communicate with cRIO RT devices "directly"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(180 Views)