08-18-2020 11:24 AM
Hello Everyone
I want to establish communication with 16 serial (COM) devices at the same time and I need to know the best way to make this possible and efficient these are my ideas:
-Make a for loop in the VISA serial port configuration and read the buffer data in an array
-Make 16 parallel while loops and obtain the individual data of each instrument
Attach code example with 4 serial (COM) instruments
If you have any information of the best way to make thie please let me know
Kind regards
08-18-2020 12:18 PM
Are you communicating with 16 of the same devices? What I do is I have a loop for each device I am communicating with. Assuming the same device, you can get away with developing 1 VI to handle a single device, make it reentrant, and then dynamically call as many clones of that VI as you need (in this case 16).
Otherwise, I REALLY question your code. Most of all, you generally should not be using the Bytes At Port. But to go any further with that, we need to know A LOT more about the devices you are communicating with and/or their communication protocol. I highly recommend this presentation: VIWeek 2020/Proper way to communicate over serial
08-18-2020 02:19 PM
Hello crossruiz
Wow, thank you for the quick reply!
Q: Are you communicating with 16 of the same devices?
A: The device that I wish to connect is a wireless receptor from Mitutoyo called UWAVE-R (attach pdf sheet). This device acquires data of different digital measuring instruments every device has the capacity to save around 100 instruments in 100 channels,
Q: Otherwise, I REALLY question your code. Most of all, you generally should not be using the Bytes At Port. But to go any further with that, we need to know A LOT more about the devices you are communicating with and/or their communication protocol
A: My project consists in connect 16 of this same device with VISA. the reason that i need to implement 16 of the same device is that the distances of operation in my company are too high and with only 1 device connected it will be not possible to obtain all the measure instruments data (attach example map of my company) you can see the area of inspection are around 20 MTS
What I do is I have a loop for each device I am communicating with. Assuming the same device, you can get away with developing 1 VI to handle a single device, make it reentrant, and then dynamically call as many clones of that VI as you need (in this case 16).
If you have an example of this it will be very helpful if you share it otherwise don't worry I think I have the main idea of this point 🙂
If you need anything else please let me know or if you think that the best solution is making a reentrant clone of the same VI like you post it before let me know too.
Regards