11-12-2014 07:24 AM
Hi Guys,
I am quite desperate because I am trying to control a syringue pump but this does not respond and gets the timeout expired before operation completed.
1) I have checked that baud rate, bits, parity... are as the device manual says.
2) The simplest command is /1ZR (to initiate the pump) and as a termination character it requires a carriage return.
3) The cable and the pump work as I have no problems to control it with a simple software made by Cavro (not in labview)
As this Threat suggest ( https://forums.ni.com/t5/LabVIEW/Changing-termination-character-doesn-t-seem-to-work/m-p/1898261#M63... ) it could be a termination character problem, I tried to do the same but nothing. What I've done so far:
- I have enabled termination character and change A by D in front panel. I wrote /1ZR as a command (visa serial configure serial port icon)
- I have directly written /1ZR\r in the write buffer and selecting ( "\" display)
- I have also tried the last choice with adding a line feed at the end /1ZR\r\n
In all these cases I get a timeout expired before operation completed. Anyone has an idea of what is going on?
I've attached a photo to clarify.
Thank you very much in advance
Solved! Go to Solution.
11-12-2014 08:59 AM
The problem may be with your string /1Z\r. If you change the string constant display to code display (by right clicking on it) you get the following string /1ZR\\r which is not recognize by the hardware so you get a timeout on VISA Read.
Change to code display and write the appropriate command or use the concatenate string function.
Ben64
11-12-2014 09:08 AM
Hi Ben,
About an hour ago it ocurred to me to make a control in enable termination character, then I turned it off and it worked!!!! you are totally right I was sending double \ it the pump couldn't recognise it.
By the way what I haven't solved is the timeout error, I mean the pump performs the operation I want but after that the timeout expirered.... error comes up, any clue?
Thanks a lot
11-12-2014 09:16 AM
@rodriferfe wrote:
Hi Ben,
About an hour ago it ocurred to me to make a control in enable termination character, then I turned it off and it worked!!!! you are totally right I was sending double \ it the pump couldn't recognise it.
By the way what I haven't solved is the timeout error, I mean the pump performs the operation I want but after that the timeout expirered.... error comes up, any clue?
Thanks a lot
Are you expecting a response from the harware? If the hardware doesn't respond the VISA Read function will time out. If you turned off the termination character then VISA Read will wait until it receive 1000 bytes or until it timed out.
Ben64
11-12-2014 09:20 AM
Yes, that was the problem, sorry for my lack of knowledge, I am new with labview. You've been very helpfull, thank you very much
11-12-2014 10:57 AM - edited 11-12-2014 10:57 AM
Actually, dang, you solved it very quickly compared to many other newbies with similar problems. Congrats are in order!