Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows defaults RTS line to HIGH (+5v), SetComConfig() sets RTS line to low

Before my application is executed, the FASTCOMM 422/2-PCI card has the RTS line defaulted to high (+5v).
 
When I run my application and executes the line containing OpenComConfig() function call, it sets the RTS line to low (0v).
 
When I exit my application, it returns the RTS line back to defaulted high (+5V).
 
My hardware power is connected to the RTS line.  When the RTS line is set to +5v, the circuitry turns on a 28V power supply.  When the RTS line is set to -5v, it turns off to 0V.
 
I need to control the RTS line to be high or low to control power on/off sequencing, and default it to OFF (-5v).
 
When no application is running, the RTS line is set to high (+5V).
After I call the SetComConfig() or SetCom(), the RTS line is set to low (0V).
After I call the ComSetEscape(CLRRTS) call the RTS line is set to ON (+5V), and the ComSetEscape(SETRTS) call, the RTS line is set to OFF (0V).
After I exit out of my application, the RTS line is set to high (+5V) - the default.
 
Question: is there a way to set the default for RTS line to low (0V) before the SetComConfig() is called?
 
0 Kudos
Message 1 of 3
(3,223 Views)
I tried using the low side of the RS422 differential line to reverse the input to my power circuitry.
 
This uses the defaulted +5V (high side) value to be OFF condition - low side is 0V instead. 
- Since the default by windows is +5V (high side), this allowed my power circuit to be in OFF condition.
 
However, upon OpenComConfig() call, this resets the value to 0v (at high side of line) - +5V at low side of the RS422 line.  Which turns on my power circuit.
- I can use ComSetEscape(CLRRTS) to reset the value back to 0V at the low side of the RS422 line, however, there is a short instance where it will power on my system - like 0-25msec or so. 
     -- I cannot have this power pulse in my system, so I abandoned this approach.
 
The LabView folks recommend I use the Windows SDK call to initialize my code, but my other ComWrt() and ComRd() will now require changes. 
- And the Windows SDK implementation has other Rd/Wrt buffer issues that I would prefer not re-visit.
 
So the question again is how to make the OpenComConfig() call without reversing the RTS line from default.
 
Is there a registry entry that I can change?
0 Kudos
Message 2 of 3
(3,215 Views)
If the line defaults to high than that probably means that that line on the hardware has a pull up resistor on it that is pulling the RTS line to 5V when it is not being driver. I doubt it is configurable, but you may try adding an external pull down resistor that is large enough to pull the line down but small enough to still allow the line to be driver high.

-Josh
0 Kudos
Message 3 of 3
(3,202 Views)