From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-25-2012 12:06 AM
I have a problem with the serial port in labview programming. I 'am communicating with a external motor through serial port. I wrote the program such that I can communicate with the motor. But the commands excutes only if the bulb in the diagram panel is on. otherwise the program never excutes. please help me in this regard.
05-25-2012 08:02 AM
the "bulb" as you call it slows the VI execution down so you can observe the program flow
the fact that the VI only works when Highlight Execution is on means that you are not allowing enough time for read or write or both of the serial port
05-25-2012 11:07 PM
So what i have to do, for this problem. How can I correct it. The problem is the motor works for the command without highlight , but it will not show the number of steps without the highlight if I give the command for that. So can you please inform me a solution. please reply
05-26-2012 07:20 AM
Put in a wait. I find 10 to 50 ms should work. As an example, typically for GPIB when requesting information from an instrument, I have a 50ms delay between sending the request and reading its data.
05-26-2012 08:41 AM
With serial ports, a 50ms wait may not be enough. I had to put in 1/2 second for one instrument.
05-26-2012 09:34 AM
@nyc_(is_out_of_here) wrote:
I had to put in 1/2 second for one instrument.
I haven't dealt with many serial instruments, but that sounds excessive to me. Anyways, perumpadapu, you might want to experiment with the delay until you find one that works for your situation.
05-26-2012 03:54 PM
Actually delays in the milliseconds is not uncommon for serial port instruments. This is not GPIB. I had originally put the delay at 250ms. The results were intermittent. I upped it to 500ms. Solid as a rock. Somewhere in between is probably optimal, but an extra 250ms wasn't going to be a showstopper.
05-26-2012 10:41 PM
thank you, for your reply