ni.com is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com is currently experiencing issues.
Support teams are actively working on the resolution.
01-06-2009 10:02 AM
I use the normal Visa commands, to configure, write and read to the serial comport.
The last command I send to my serial device, causes the device to continuesly transmitting packets. - this is correct, as this
is the mode I want my serial device in before closing down the comport
The problem is, because the receive buffer keeps on getting data from the device, closing the comport causes labview to eventually crash.
Any advise?
Goose
01-06-2009 10:17 AM
01-06-2009 10:56 AM
01-07-2009 04:47 AM
I am really stuck now, and not sure what to do!!!
Is there a long delay between when you send the last command to instruct the device to go into continuous mode and when you actually close the com port? -> there is a delay, but I cant see this making any difference?
Are you sure the com port is actually closing? - No idea, how can I confirm this?
It doesn't make send that LabVIEW would crash. If you close the com port, the PC should just shutdown the buffer and would ignore anything coming into it on the receive lines. -Thats what I was hoping for too
The bottom line is, my program crashes, and does not seem to release the comport.
How can I go about debugging this, or fixing this?
Do you have any field engineers who can visit me to look at this problem?
Many Thanks
Goose
01-07-2009 05:16 AM
What kind of serial port are you using. Do you use a laptop or desktop computer?
01-07-2009 05:35 AM
Standard Com1 of my desktop PC, using NI Serial VISA...
I've tried many things which all reflected back to the issue that my device keeps sending data to the port, when I close it.
Sometimes, after my application completed (and not crashed), I can not open that serial port with something like hyperterminal for instance, as
it reports the port can not be opened, which means, labview did not close the port.
01-07-2009 06:34 AM
01-07-2009 07:47 AM
Are you using the latest and greatest version of NI-VISA? They where some similar issue back in about LV 7.1 days.
Do you really want to keep the widget transmitting and THEN close the port?
How about flushing the buffer before the close?
Ben
01-07-2009 09:30 AM
Thanks all for the replies!
I am using Visa 4.4, this is the latest right?
I am not using Handshaking lines, and therefore not possible to deassert RTS to stop the the device transmitting.(tried it already)
To close the port, I flush the tx and rx buffers and then close the port immediately, but problem still occurs.
I can not shut down Labview, as after I close the port, I have to open it again for something else with the same application.
Is it possible to post you (NI) my hardware and software to have a look at this problem?
01-07-2009 09:39 AM
morngoose wrote:...
Is it possible to post you (NI) my hardware and software to have a look at this problem?
Clarification: Only those contributors that have blue colored bars under their names are NI. Every that has replied to you so far are just volunteers trying to help out.
Check the NI Drivers and download (search on this web-site) to see what the latest and gretest version are.
You can zip-up your application and when you submit another reply to this thread, look fo rthe "Add Attachments" link under the "Submit Post" to attach your code.
Mention which version of LV you are using so people don't waste their time only to find they don't have the version you are using.
Ben