Jump to content

TechNick

Members
  • Posts

    2
  • Joined

  • Last visited

LabVIEW Information

  • Version
    LabVIEW 2019
  • Since
    2002

TechNick's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. UDP is a lossy protocol so it probably isn't the best solution for this application. The simplest thing to do would be to use Shared Variables. You can have a single shared variable on the master computer and monitor this variable for a change on the client computers. If you use shared variables you don't need to get into TCP programming at all. One the client computers use the DataSocket Read VI with the option to "wait for data change". You will use a URL something like "psp:\\server_name\library_name\variable\name". Now, whenever you want all the computers to take a new measurement you simply write a new value to the shared variable on the server. The DataSocket Read VI on the clients will return a new value (which you may or may not even need) and then the program can take the measurement. Alternatively, you can establish TCP connections between the server and the client comptuers and write a "trigger" command to each client connection in a FOR loop.
  2. If you're just concerned about getting an event on the one Modbus register you can use the 'DataSocket Read' VI in blocking mode. This function will return a value only when the Modbus register changes or upon a timeout. To get the desired behavior you would create a separate while loop that uses DataSocket Read to monitor the tag then generate a user event for your main loop if the data changes. You can get at the Modbus register using a 'psp://...' URL. -Nick
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.