10-04-2021 12:05 PM
Hi doc_d,
No worries!
For sending multiple commands, I'm assuming you're either referring to sending the setpoint to different devices or sending other commands (but similarly needing to differentiate which device it's going to). If that's the case, you can throw in a control for the unit ID string, and then concatenate the inputs to make the send commands unit ID specific.
You can do a similar thing for the data reads if you need to make them individually callable, and when you want to read all devices you can then just do a for loop over an array of the unit identifiers.
If you still want some cases to grab data from all devices or if you want to add more functions, you can always add more cases.
In trying to explain that the different commands will have different potential return data lengths, and ways to overcome that, I figured the easiest way would be to just send over the example I made using this as the TCP read with arbitrary termination characters (CR in the case of the Alicat devices) - https://forums.ni.com/t5/Example-Code/One-alternative-to-efficiently-handle-TCP-reads-of-unknown/ta-.... I can't test that it works as intended as I don't have a TCP converter, but it seems like everything's set up as it should be. Source is LV2018, so it should be readable if you have a copy of 2018+ but I can add screen snippets if needed.
10-05-2021 07:09 AM
@doc_d ha scritto:
Thank you for your reply. Yes, they have support for labview drivers and vis but I could not find one matching with my requirement because I am using USR-TCP232-302 for which there are no drivers or VIs available.
USR-TCP232-302 is an Ethernet Serial Server. You may download and run the USR-VCOM (or equivalent) program that allows you to set up a virtual serial port. Then, I guess, you can use the Alicat drivers.
11-19-2021 03:04 AM
"USR-TCP232-302 is an Ethernet Serial Server. You may download and run the USR-VCOM (or equivalent) program that allows you to set up a virtual serial port. Then, I guess, you can use the Alicat drivers."
Is this possible, Sir?
11-19-2021 03:05 AM
Thank you for your suggestion If this approach works It will save my time.