ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS485

I'm trying to simulate using an RS485 cable, through COM ports...
Is there any way to set the DTR in labview 5 (the easier, the better ->
preferably using the Serial port VI's)?


I know that in turbo C/C++, this would work...
if(format == 1) outp(comport+1,(inp(comport+1)&253));
// assert DTR line for Data direction control - Test Set needs that for
// RS485 port direction control

and to release it,
outp(comport+1,(inp(comport+1)|2)); // Release DTR line - ready to receive

but I can't find anything in Labview, that I can get working


--
Slade Squire
Programmer
Rectifier Technologies Pacific
Melbourne, Australia
SladeSquire@rtp.com.au
0 Kudos
Message 1 of 4
(3,177 Views)
You can set DTR with a VISA-Proberty-Node. Open the example-VI in attachment.
Christian

Test Engineering
digades GmbH
www.digades.com
0 Kudos
Message 2 of 4
(3,177 Views)
Use 'serial line ctrl.vi' in \vi.lib\INSTR\_sersup.llb.
It allows you to control DTR and CTS.


"Slade Squire" wrote in message news:9oom5h$38d$1@perki.connect.com.au...
> I'm trying to simulate using an RS485 cable, through COM ports...
> Is there any way to set the DTR in labview 5 (the easier, the better ->
> preferably using the Serial port VI's)?
>
>
> I know that in turbo C/C++, this would work...
> if(format == 1) outp(comport+1,(inp(comport+1)&253));
> // assert DTR line for Data direction control - Test Set needs that for
> // RS485 port direction control
>
> and to release it,
> outp(comport+1,(inp(comport+1)|2)); // Release DTR line - ready to receive
>
> but I can't find anything in Labview, that I can get working

>
>
> --
> Slade Squire
> Programmer
> Rectifier Technologies Pacific
> Melbourne, Australia
> SladeSquire@rtp.com.au
>
>
>
0 Kudos
Message 3 of 4
(3,177 Views)
You might try the functions In Port.vi and Out Port.vi under the
Functions-> Advanced -> PortI/O palette. This lets you do something very
similar to the C code inp and outp. If you are running NT, you will need a
different version of these vis than the ones supplied, as well as the
CVIRTE.dll. See the link
http://digital.ni.com/public.nsf/websearch/62790c9621f599cf8625659f0068e6e9?
OpenDocument which talks more about using In Port and Out Port on NT.

Hope this helps.

Jim

Slade Squire wrote in message
news:9oom5h$38d$1@perki.connect.com.au...
> I'm trying to simulate using an RS485 cable, through COM ports...
> Is there any way to set the DTR in labview 5 (the easier, the better ->
> preferably using the Serial port VI's)?
>
>
> I kn
ow that in turbo C/C++, this would work...
> if(format == 1) outp(comport+1,(inp(comport+1)&253));
> // assert DTR line for Data direction control - Test Set needs that for
> // RS485 port direction control
>
> and to release it,
> outp(comport+1,(inp(comport+1)|2)); // Release DTR line - ready to
receive
>
> but I can't find anything in Labview, that I can get working
>
>
> --
> Slade Squire
> Programmer
> Rectifier Technologies Pacific
> Melbourne, Australia
> SladeSquire@rtp.com.au
>
>
>
0 Kudos
Message 4 of 4
(3,177 Views)