LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize host PC and desktop RT target?

I have two independent state-machine VIs, one for a host PC which contains all of the controls, indicators, file operations, GUI operations, etc. and one for the target running ETS which performs operations in a timed loop. I'm using the Spring 2006 versions of LV8 and the RT module. Both run in a pre-defined state-machine (where certain actions must occur before another). For example, files must load on the host and certain values be published to shared variables in stage A before the target and host can enter stage B.

I implemented the rendezvous VIs to get this to work. The rendezvous is created by the RT target, typecasted to a string, and published to a string shared variable. The host then reads this shared variable, typecasts the data back to a rendezvous, and uses the rendezvous. I'm getting this error when I run the host VI (after deploying the target VI):

Error 1 occurred at Top Level Host VI.vi >> Wait at Rendezvous.vi:6
Possible reason(s): LabVIEW: An input parameter is invalid ; NI-488: Command requires GPIB Controller to be Controller in charge.

I have not seen the GPIB acronym before so I don't think that I'm using it at all. There are no NI boards in the target machine and only a CAN card in the host, so I'm pretty sure that the error is that a rendezvous cannot be typecasted to a string and pulled back out again. Does this sound correct?

Is there a better way to synchronize the two state-machines, ideally using the shared variable feature?

0 Kudos
Message 1 of 4
(3,525 Views)
Hello,

I am not an expert, but I have been using shared variables and RT targets and I think trying a communication with a network-published shared variables and when it works use several of them to get the functionality of rendevous or semaphores will work better than using the rende-vous.viI to synchronize to targets.

 If you need the synchronization to be better than 1ms, may be shared variables will not work and it will be better to use a UDP or TCP conection.

This is just a suggestion,

Miguel

0 Kudos
Message 2 of 4
(3,515 Views)
Miguel,

Thanks for some new thoughts. I was hoping to use the rendezvous for simplicity, but I can't figure out how to get a single rendezvous to work with two computers. I see what you mean about the individual shared variables combined with while loops and having it progress through. Fortunately, I don't need millisecond timing between the VIs so I think it will work out.

Thanks,
Jason

0 Kudos
Message 3 of 4
(3,511 Views)

Hi,

I also have similar problem. I am communicating the Host PC with cRIO based RT Target using TCP communicatin. In my host PC I am using my all controls , indicators, graph, file writting etc. I am sending the control value to the RT target(cRIO) using TCP/IP communication and In RT target i am reading the control and using the same control value in two independent timed loop. One timed loop I am using for timing calculation for DC motor and another timed loop using for PID control of motor.

When I run the programe in RT target and operate the motor fron RT target front panel itself, its work fine but when ever I communicate through Host PC and try to operate the motor , motor gets flikker and stuck in some position and after some time RT target get lost.

 

I have attached the vi and block diagram's snap shot for your reference. Please help me here find the problem.

 

 

Thanks

Srikant

Download All
0 Kudos
Message 4 of 4
(3,000 Views)