02-01-2012 01:52 AM
Hi
I was looking at the Labview<-->serial.vi and it seems to output pulses of +-12V of ~200 microsec durations. Is there a vi to output a constant DC voltage from the serial port (range=0.5V to +/-12V)? any other range is ok too.
thank you
Saurabh
Solved! Go to Solution.
02-01-2012 03:05 AM
Hi,
you can use a property node to set some status lines of a serial interface to high or low. I think this is not possible for the TX and RX line.
Cheers
Edgar
02-01-2012 07:46 AM
While you can set some the lines of a serial interface high/low you cannot control their voltage levels. Also, the voltage level you get is manufacturer-specific. The RS-232 spec does not guarantee a specific voltage.
I suggest you look into finding a cheap programmable power supply, or one of the analog output devices that NI sells.
02-01-2012 11:31 AM
Well, actually the amplitude is not an issue. All i want is that one of the line of the serial port output should stay high till the vi is running and low (preferably negative, but thats not very stringent) when the vi is stopped. I am sorry I did not make it clear earlier. Will it be possible?
thanks
saurabh
02-01-2012 11:52 AM
Look at the shipping examples on how to control the controllable serial port lines. Open the Example Finder (Help -> Find Examples) and search for "serial". Open the example "Troubleshoointg Serial Line Monitor".
As I said, the actual voltages you get cannot be controlled at the application level, but you will at least be able to determine what's high and what's low. You will need to measure them yourself and take whatever additional steps are required (such as level shifting). Note that this may be different on other computers and/or serial port implementations.
02-02-2012 12:25 AM
Hi
I have labview 6.0 (which I need to upgrade badly!). The examples there are- "Labview<-->serial.vi", "serial communication.vi" and "serial read with timing delay.vi". I dont think I have the one you suggested.
I can use the parallel port as well. Do you have anyother suggestions? I am scavenging for a cheap programmable power supply.
thanks
saurabh
02-02-2012 04:15 AM
Also, can I simply modify the labview<-->serial.vi to stay high while the vi is runnning and vice versa.
I cannot find any example with parallel port with Labview6.
thanks
saurabh
02-02-2012 08:00 AM
The example isn't there, but the capability is. The properties were grouped a little differently. Attached is the example backsaved to LabVIEW 6.
And, yes, you badly need to upgrade. LabVIEW 6 is stone age material.
02-02-2012 10:12 AM
Also, be sure to check the behavior of the serial handshaking lines during initialization of the port to make sure that it does not produce the voltages you do not want for a few microseconds. The behavior during initialization may not be well defined.
Lynn
02-02-2012 12:40 PM
Got it. Will try it first thing in the morning.
Regards
Saurabh