10-21-2009 02:05 PM
Solved! Go to Solution.
10-22-2009 01:55 AM
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
10-22-2009 01:31 PM
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
10-23-2009 01:53 AM
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
10-23-2009 01:33 PM
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
10-26-2009 02:40 AM
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
10-26-2009 12:49 PM
hi,
thanks for all help, it was a very useful information.