dathlin / HslCommunication

A very popular industrial Internet of Things communication plug-in. Using this dll can be very convenient, stable, and fast to obtain data from PLC equipment of multiple brands, and also supports redis, mqtt, websocket, etc., which can let your data on the network Free transmission, reducing enterprise development costs.
http://www.hslcommunication.cn
1.56k stars 612 forks source link

Any one know whether HSL can read/write AB Controllogix time? #22

Open U11Leung opened 2 years ago

U11Leung commented 2 years ago

As the title says, does anybody know or ever try to read/write plc time on Allen-Bradley ControlLogix/CompactLogix? Searched the API document but did not find anything related

dathlin commented 2 years ago

I'm very sorry, there is currently no built-in API to read and write time data, but you can read raw byte data, and you can parse it into time type data yourself.

U11Leung commented 2 years ago

Appreciate your quick reply! But I want to know more about raw byte data? Is by reading raw byte data I can read the plc local time, which is displayed here? How am I reading that? image

dathlin commented 2 years ago

There are currently two methods to try.

  1. Use DEMO to browse the node content of PLC, there is a special CIP protocol node browsing interface. Check to see if there is a system node or the like, the system node may have been blocked, and the success rate of this method is not high.
  2. If your PLC program can access the time variable, assign the variable data to the common node, and then access the common node variable.
U11Leung commented 2 years ago

Sorry, but I did not see anything like that you said? image

image