LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass data in our PC 4s 485 port?

Dear All,

 

I am working on 1 application, in that we are using Embedded PC windows7, it is more similiar to Windows7. in that we are getting data from a source panel, this data we have to pass to another pc using rs 485. in my embedded pc windows 7 i have rs485 port. but i am confused how to write data into that rs 485 and how i will read data into another pc from that rs 485 port.

 

to write and read the data from rs485 , we need some register address details. so please guide us on that part.

0 Kudos
Message 1 of 6
(2,557 Views)

I think that if you install NI VISA you can select from the block diagram 'VISA OPEN', and wire a control to it. From the control you can select the correct COM port.

 

0 Kudos
Message 2 of 6
(2,544 Views)

ya my rs485 port address is COM2, and i have used it,  i have to write data into particular register address, so i have to define the register address and write data into that.

 

Prashant Soni
LabVIEW Engineer
0 Kudos
Message 3 of 6
(2,534 Views)

so whats the communication protocol?

For example, I use Modbus RTU over RS 485

 

0 Kudos
Message 4 of 6
(2,524 Views)

yes i have to use modbus RTU

as a communication protocol.....

Prashant Soni
LabVIEW Engineer
0 Kudos
Message 5 of 6
(2,507 Views)

Ok, now with what are you communicating?

For example, I'm using Bronkhorst Flowmeters. They have specified Baudrate, parity and stop bits for their equipment.

See attached snippet for how to open communication (download the Modbus library for NI).

open communication.png

Next, wire the visa resource name to MB master query (VI from the modbus library). There are several things you can do: read or write digital values or read or write words.

if you're familiar with that you're good to go, if not post and I'll help you out.

read or write.png

Now what is important is that you know which registers you can read and write from your device. The manufacturer should give a list.

Also, make sure your device has the correct NODE ADRESS configured!

 

 

Apologies for the messy figures, dont know what happened :S

 

Felix

 

0 Kudos
Message 6 of 6
(2,490 Views)