LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Closing a serial port

When LabVIEW closes the serial port (via close serial driver vi) what is sent to the port?
0 Kudos
Message 1 of 5
(2,645 Views)
That is probably something you should ask NI at ni.com/ask. They can answer that question.

However; is there a reason you need to know? Perhaps there is another solution to your problem.
0 Kudos
Message 2 of 5
(2,645 Views)
LabVIEW doesn't send anything to the port when you close it.

I'm not sure what platform you are talking about, but on Windows, we call the Win32 API function PurgeComm() to terminate all pending I/O, and then we call CloseHandle().
Message 3 of 5
(2,645 Views)
I have a switchbox that I have basically no documentation for. All the switchbox does is switch between 7 different channels. When I was messing around
with it and sending it different commands, it would
change channels (which is what I want it to do) when
I would close the serial port with the close serial driver vi.
0 Kudos
Message 4 of 5
(2,645 Views)
if you are saying that you only see the action you want when you close port, you may need to flush the write buffer to insure that the commands that you are sending out the 232 port have actually been sent.
0 Kudos
Message 5 of 5
(2,645 Views)