Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

how to solve communication speed too slow

Hi everyone,
 
I try to make an automation code to manipulate a machine. But the problem we have now is that, every command need 1s interval to execute the next command. 
 
This is strange. Because  for read function, the speed is fast. But after reading all the outcome, the machine need 1s to play the next write command. If we reduce the time.sleep() to less than 1, the machine will return X15. Do you have some idea why this situation happen and how to reduce the communication speed?
 
Below is the simplified code. Thanks for all your help in advance!😊
zhuzhuzizi_0-1700571997040.png

 

0 Kudos
Message 1 of 5
(1,491 Views)

What NI hardware are you using here?

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 5
(1,480 Views)

Serial speeds are often dependent on the device you are communicating with.  I've had some that needed 50ms between commands.  Others will take a constant stream of commands.  I once dealt with an oscilloscope that needed 500ms to 1 second delays between commands so that it had time to perform the command or it would get interrupted.

 

So any information you can give us about the device you are trying to communicate with would be helpful.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(1,459 Views)

sorry, acutually no. I find that people in this forum very likely encounter similar issue before, so I posted here.  

0 Kudos
Message 4 of 5
(1,441 Views)

The device is Dressler model 1312, which is a plasma generator.

0 Kudos
Message 5 of 5
(1,439 Views)