LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi with access via both user interface and external communication

Hi,

Maybe a little bit too general but I'll risk it:

It concerns a project to stear a tensile machine. Data acquisition is relative straightforward via a few analogue and digital channels.
The interaction of the operator with the tensile machine can be done at two levels:
1. Directly via an user interface on the computer next to the machine. Here I would typically use a state machine in combination with event structures.
2. Remotely,  via TCP protocol. Here different clients (external program, written in C) should be able to connect to the LabVIEW program and send simple commands such as 'read force', 'write force', 'read status', ...
It is relatively easy to setup a small daemon that accepts TCP connections from multiple clients. Furthermore I would put the commands from the clients into a message queue (using a producer/consumer structure).

I was wondering what the best method is to allow both the user interface and the external clients to stear the machine (e.g. using an event structure to respond to interactions via the user interface, and create user events from the commands of the clients to access the same actions).


Steven
LV8.5


0 Kudos
Message 1 of 2
(2,171 Views)

Hi VPS,

one way could be to build your TCP receiver in one while loop and your event structure in another while loop. if you want to send a command from the event structure you can send this over tcp to the TCP receiver.

Another way could be to use a queue or notifier to send the commands from the event structure and the TCP receiver to another while loop which work with the received commands.

Mike

0 Kudos
Message 2 of 2
(2,170 Views)