01-16-2012 11:11 AM - edited 01-16-2012 11:13 AM
Im using labview to communicate with the serial port of the servo drive, and am getting problematic failures under a certain set of conditions. The problem occurs when it servo drive has not yet powered when labview initiates communication. There seems to be some type of comm port lock created by labview which cant be released, even if I close labview (exit) and reboot the servodrive. So far the only way I have been able to unlock the communications is to close labview and then open up the vendors proprietary software with establishes communication with the serial port. After this has been done, I can immediately close the vendors application and work with labview/servo drive again. But this is not a professional solution.
I cant figure out who to fix this or how to describe what is going, Its like I need a lower level to work at to see it. For debugging, Ive also implemented up to a 1 second “serial break” which does not fix the problem.
Any help or ideas on how to fix or debug this?
attached, relevant code with irrelevant sections stripped
01-16-2012 11:14 AM - edited 01-16-2012 11:17 AM
I don't have your subvi's so I can't comment on your code (although there is a huge nearly-empty While Loop...)
Are you closing the VISA (serial) reference? That will allow you to use the serial port with other applications.
01-16-2012 11:32 AM - edited 01-16-2012 11:32 AM
01-16-2012 01:33 PM - edited 01-16-2012 01:42 PM
this is now solved
im still not sure what the causes are but it is realted to shutting off remote serial port and also changing the baud rate.
without wasting a lot of time, ill just post a screen shot of what has to be done to fix it
this will allow the user to connect to a copley controls servo drive, set at unknown baud rate, regardess of PC state
i will say its probably a good idea to add the serial break to the main labview VIs (its in the "touch panel module",), its a good general use VI for connecting with a serial controller that can accept a break command, many of which do.
01-16-2012 04:09 PM
this, attached, is a little bit better (fixes case of computer reboot) and documented a little better too
yes, serial break is not part of standard license so make sure you have license for it.
but i would like to point out, its a great general tool to have, i honestly wasted 2 weeks becuas i needed it
its in part of some embedded control set.
01-17-2012 02:57 PM
Zip up every subvi (everything) and post the entire code. We cannot determine what goes on from those images..