LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

enhance speed

Hi everybody ,

I am controlling a machine with the program I attached to this email through the serial port RS232. The behavior of the machine is dependent of the input data from the DAQ (this output machine which is connected with the PC through RS232 should imitate the system which provides the input to the DAQ). My question for you would be if there are some principles, suggestions, or ideas on how to enhance the communication between the application and the port , because at the moment, the machine reacts to the input with ~1sec delay. In this respect it is not really a certain amount of delay that I pursuit, only that the delay is visible, and thus this makes the application suboptimal.

Thank you very much,
Dana
0 Kudos
Message 1 of 7
(3,093 Views)

Hi Dana,

in your second while loop, where you read the DAQ data and write to the RS232 port, there are two wait functions, one with 200 ms and one with 500 ms (between read and write of RS232). If you want directly react on you DAQ data, i think you have to delete this wait blocks or reduce the time. The timeout of the DAQ read function should be enough to give some time to the processor.

Mike

0 Kudos
Message 2 of 7
(3,081 Views)
Mike,
thank you for your reply. I will take care of what you said. But however, isn't that going to have an effect only on the 3-tuplet {input device, DAQ, processor} , not affecting though the thing I am mostly concerned about- {DAQ, RS232} communication. I assume that by  removing those timers, I shall have more data to feed the RS232, so that maybe have even a bottleneck, and secondly the reaction of the machine through RS232 will still be delayed... Is it possible that I may be wrong in that?..

Regards,
Dana


0 Kudos
Message 3 of 7
(3,075 Views)

Hi Dana

Ok in this way you are right. How do you measure your delay? What kind of machine is it?

Mike

0 Kudos
Message 4 of 7
(3,071 Views)
Hi Mike,
the machine that communicates with the PC via RS232 is a robot hand. I expect a finger to move whan I flex a remote bending sensor. So the problem here is that I flex the sensor, and after ~1 sec, the robot hand's finger moves. I don't use a precise measurement instrument to measure this ~sec, just my internal human counting..

Regards,
Dana

0 Kudos
Message 5 of 7
(3,064 Views)

Hi Dana,

at the moment you communicate over RS232 with 9600 Baud, is it possible for your robot to communicate with a higher baudrate? And as said before possibly the time between write and read could change something, i´m not sure, but i think it could be possible the the robot react first after sending back a command.

Mike

0 Kudos
Message 6 of 7
(3,062 Views)
How big is the program in the robot? Could be that the scan time of that program is around 1 sec. How often does the robot service the comm port? once per program scan?
0 Kudos
Message 7 of 7
(3,043 Views)