Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

connecting a plc without opc server

Solved!
Go to solution
hi, can i connect a plc to labview 7.1 (to send and read data) without an opc server, using just an rs232 cable from plc to pc.
0 Kudos
Message 1 of 7
(11,779 Views)

syd_b,

 

there is no general answer to this question. Some PLCs use simple serial protocols that can be implemented in LabVIEW without difficulty. E. g. if your PLC talks Modbus, you can download a Modbus library from ni.com. Things become much easier with an existing library or instrument driver. Implementing a complex protocol by yourself is possible, but it might be cumbersome and sometimes it's hard to get the full documentation. Which PLC and protocol do you have in mind?

 

 

Kind regards,

Jochen Klier

National Instruments

0 Kudos
Message 2 of 7
(11,778 Views)

 hi, the protocol is serial(rs232) and it´s an allen bradley plc. and i don´t want to use opc server, i have to use a direct serial communication. 

If it´s possible, what do i have to use in labview to read and write data. an example will be awesome.

 

thanks

0 Kudos
Message 3 of 7
(11,769 Views)

syd_b,

 

RS232 is just the physical interface, but it says nothing about the communication protocol. Allen Bradley PLCs use several serial protocols, e. g. the DF-1 protocol. You can either try to implement the protocol by yourself by using VISA calls (good documentation is required) or you can purchase a library. NI doesn't offer an Allen-Bradley library for LabVIEW, but I have found a vendor with a quick Google search.

 

Jochen

0 Kudos
Message 4 of 7
(11,764 Views)

hi, the protocol is DF1. I have to use VISA calls to read and write?

 

Sorry, but i´m really new in this topic.

 

thanks

0 Kudos
Message 5 of 7
(11,750 Views)
Solution
Accepted by topic author syd_b

Hi syd_b,

 

yes, VISA read and write operations are basically the functions you have to use. Please refer to shipping examples for serial communication. Still I don't have a clue how complex the DF-1 protocol is to implement. It might be a much better deal to purchase an OPC server or a ready to use library instead of reinventing the wheel, but of course that depends on your personal circumstances.

 

Regards,

Jochen

Message 6 of 7
(11,732 Views)

hi,

 

thanks for all help, it was a very useful information.

 

 

0 Kudos
Message 7 of 7
(11,724 Views)