From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication (RS 485) with a Controller using ModBus RTU

hi,

 

i'm trying to communicate with a controller (TLK31) over a RS485 ( NI PCI 8431/2 - http://www.ni.com/pdf/manuals/371253e.pdf ) port by using ModBus RTU protocol. what i want to do is to write a value in a register address.

 

the TLK31 has 3 wires to connect, GND, A(-) and B(+), wiring is as shown in the picture.

 

i try to describe the VI at the attachment:

 

after initializing the port i use select the number of the programmable set point (i just need one) and activate this one. after entering the address of "set point 1" (which is 0*2802) and transmitting any data value it's necessary to start the CHECKSUM calculation by writing any value at the adress 0x39B.

 

well, the problem is, i can't transmit any data to the device to set the value of the "set point".

 

thanks for any help.

 

Download All
0 Kudos
Message 1 of 7
(7,281 Views)

Hi,

 

Hardware or a software problem. Or both !!

 

No terminators in your picture. This could be OK if it is a short wire. But for some isolated devices you have to use terminators.

 

In 'my world' the A line of a RS-485 interface is the '+'. I know there manufacturers that wil reverse the '+' and '-'. In you picture the A line is the '-'.

Can you reverse the A and B connection at one side ?

 

Kees

0 Kudos
Message 2 of 7
(7,258 Views)

Hi K C,

 

first of all. thank you for your interest 🙂

 

now to answer,

i already tried the connection by inverting the pins. but the same result. no data transmitting, or any reaction from the device. the wire is about 5m long, so i guess don't need to use terminators...

 

 

0 Kudos
Message 3 of 7
(7,253 Views)

Hi,

 

At 5 meter I would try to add the resistors.

 

But before that can you try starting address 10242  ?

 

Kees

0 Kudos
Message 4 of 7
(7,251 Views)

In your last post you say: '..no data transmiiting..' How did you verify this ?

0 Kudos
Message 5 of 7
(7,223 Views)

Hi K C,

 

the SetPoint-Value wich i want to transmit is shown on the device-display. default value is set as 20°C. if the transmitting is successfull so the value will change into the transmitted data. 

0 Kudos
Message 6 of 7
(7,220 Views)

Ok, so it migth be that your computer is transmitting but with the wrong data. Did you try the starting address that I mentioned ?

0 Kudos
Message 7 of 7
(7,218 Views)