LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple DataSocket Read/Write

Hello, is it possible to read/write to many datasockets in one shot? Right now, I loop through all my URLs to open them, then loop again to read or write, and finally loop again to close when reading is done. I do this for about 60 datasocket connections, and I'd like to speed things up.

We're using LV 8.0.1 and the Industrial Automation OPC Server to communicate to a PLC and an electric drive over Modbus. We've tried changing different settings in the OPC server and the member configurations, but can't seem to get things to go faster.

It'd be nice to read or write all the data without having to loop through one by one, and the DataSocket VIs will only accept one connection at a time. I haven't seen a way to create a member in the OPC server that is an array in itself. Does anyone know how to do this or what things I can do to speed up my communication?

Thanks,
Sima
0 Kudos
Message 1 of 3
(3,965 Views)
The only thing I can quickly think of is to do everything in parallel. Although with 60 items to write to, that could eat up a lot of screen real-estate.

You could try doing 10 writes in parallel in a loop, then you'd only have to loop 6 times instead of 60. That should speed things up. There may be some maximum number of simultaneous datasocket connections allowed, but I'm not sure. You would have to do some experimenting to see if it speeds things up or a certain number at a time is best.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 3
(3,963 Views)

Hi Sima and Ed,


As I am in a similar situation, just curious if you could finally do that multiple datasocket writing at one shot?


As for Ed's suggestion, in my program I am doing something similar, having the same idea that it's possible to run several parallel loops to write on datasocket. But in fact, while doing so, it throws an error.


I have posted the same question (from my lab id) here. Can anybody please tell me what is going on in this problem?


Thanks ahead!

0 Kudos
Message 3 of 3
(3,586 Views)