I am running LVRT7.1 on a PXI8176 connected by Ethernet to Windows XP PC.
I am running a motion control program using Command-Based Architecture to communicate (http://zone.ni.com/devzone/conceptd.nsf/webmain/CD63FD0F746B17A686256F090065F572). My programs consist of:
RT Target vi:
1) Time-critical TIMED loop (handles motion control, reads and writes values to RT-FIFOs)
2) Receive WHILE loop to get commands from Host via TCP Read and write to RT-FIFO
3) Medium-Priority Tasks (MPT) TIMED loop to read from RT-FIFO and send values to host via TCP Write
Host vi:
a) Event-driven WHILE loop to write values to TCP when changed
b) Receive WHILE loop to read values written by MPT
I want to be able to stop all loops by either of two methods
A) User presses STOP button on front panel (command generated in loop a), or
B) actuator reaches some given position (command generated in loop 1)
How can I do this?
It is not so hard for condition A (STOP ends loop b, NewValue in event writes to TCP then ends loop a, received value on RT Target ends loop 2 and remotely stops loops 1 and 3). For condition B, I can stop all RT loops, but not the host loops. My Event structure has a short timeout, but I can't use local variables to stop both loops due to the latching action of the stop button.
Has anyone dealt with this issue (bidirectional stopping) specific to the Command-Based Architecture structure? I think the solution would also apply to RT Communication Wizard programs.
I do not have LabVIEW available now, but can include a small sample prgram in a few days if that would make the issue clearer. Thank you.
__________________________________
Laine