Slade,
RS-232 electrically swings from +12V to minus -12V... and RS-485 is
actually the physical implementation of an RS-422 signal, which is a
differential signal where each leg swings between +5V and GND (in
opposite directions)...
Anyway, do you actually plan on using resistors and zener diodes to
clamp the Tx signal and the DTR signal to create two output signals that
move between +5V and GND, and then use software to make them move in
opposite directions?
How would you synchronize them, since one uses the internal shift
register of the UART? I guess you could use the RTS and DTR as outputs,
right? But how could you generate the bit clock? With the 1 msec delay
function in LabView you really couldn't hope to get anything more that
4800 baud, right? Though
I doubt you could even get that reliably.
Let me know how it works out...
Bill
p.s. You could use Port I/O vi's under Advanced Functions to write
directly to the port just as you did in the C code.
Slade Squire wrote:
>
> I'm converting a C/C++ program into Labview... The program simulates a
> rectifier, and CSU... (this bit is unimportant)
>
> Anyway... I'm using a RS232 cable, and I need to simulate a RS485 cable with
> it...
>
> In C++, the line I would use to set the DTR would be along the lines of:
> ->outp(comport+1,(inp(comport+1)&253));
>
> Does any one have any idea how I could set the DTR in Labview?
> Is it possible... I've exhasted all other avenues of searching, and got
> nothing.
>
> I'm desperate.
>
> --
> Slade Squire
> Programmer
> Rectifier Technologies Pacific
> Melbourne, Australia
> SladeSquire@rtp.com.au