Simple way to extract individual value of boolean or integer?

sbagdon

Member
Join Date
Oct 2020
Location
Michigan
Posts
7
Have beginner knowledge of digital controls, and intermediate/advanced knowledge of socket clients and listeners (written logging proxies, socket automation with cookies/headers, etc).

Allen Bradley PLC, with "1769-L30ER" and "A LOGIX5330ER". PLC coder has added a boolean, and a counter that resuls from the boolean.

What is the simplest way to extract that boolean and counter value, from a linux CLI (preferably client).

Web server running on plc :80 shows pages of data, yet all system/network, no stored data. If we could get it from there, wget would take seconds.

snmp is running, yet again... only system/network info. Again, if we could get the data there, snmpwalk would take seconds to write.

Or, is there a simple way to open a socket on the plc, submit a get of some sort, receive a socket return, then hang up... open, send request to get boolean value, receive boolean value, close?

Are there any perl modules (such as with ftp, etc), that would permit a simple open, submit, receive, close?

Thx!
 
Please don't re-invent the wheel. ControlLogix has a complex, mature, and well defined communications protocol and data access protocol.

There are open-source and commercial libraries for Perl and Python and Java and C to communicate with ControlLogix/CompactLogix tags of all data types.
And here, I was going to make it square... :)

Just looking for breadcrumbs, and you've given me a few slices... I will take this, and start diving head-first in to it this evening.

I'm a simplist, I'll reply back after this, with thoughts on how not to learn an entire protocol, to download a single boolean.

Thanks!
 
Buy a copy of Ingear drivers and you can read or write to ant tag on any logix processor
they are a bit pricie but you can use them on any windows system
 
Buy a copy of Ingear drivers and you can read or write to ant tag on any logix processor
they are a bit pricie but you can use them on any windows system
A full set of drivers is a bit overkill... this was just an exercise to quickly read PLC integers from Unix, for unified metrics, monitoring, etc.

Downloaded the perl module, and got it working in the local dir. A lot simpler then thought it would be... not wget or snmpwalk easy, yet proof-of-concept perl script (to prove to leadership it could be done easily) is exactly 20 lines long.

Thanks much for the breadcrumbs, will continue reading up on the entire ecosystem of protocols and tools.

Thx!
 
Been using the module for a few months, works great, just seem to only be able to read controller tags, not local tags.


PLC coder says we need the syntax for the perl module, so they can get the values for that syntax... cpu, program, etc.



or is by definition only controller tags available to the plc IP interface, and perl module...?


thx!
 
If the perl module can only read controller scoped tags? Have you tried the following syntax?

Program:programName.TagName

(Program is always Program, ProgramName is the name of the program that the tag was defined in, and the tag name is obviously the name of the tag you want to read)

The python module Ken linked can read/write program scoped tags. At least for CompactLogix and ControlLogix. Micro800 series doesn't allow for this ability.
 
If the perl module can only read
Program:programName.TagName

(Program is always Program, ProgramName is the name of the program that the tag was defined in, and the tag name is obviously the name of the tag you want to read)
the breadcrumbs we needed, thx! we can now read the local tags... we looked, just couldn't find the docs. Thx!
 
I have perl on a Raspberry PI 4. Anyway you might post up the code you used? I have an old CompactLogix sitting around I might interface it with.


Thanks, Jack.
 

Similar Topics

Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
243
I'm trying to build my Classic Step 7 programming skills this weekend. I get stuck on little things that are not covered in YouTube tutorials. I'm...
Replies
7
Views
306
I have a program that does a 7 second "scan" sensor calibration routine whenever a setting (setting is called assistance level or "AL" and ranges...
Replies
3
Views
201
Hi all, I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay...
Replies
4
Views
292
Hi all! I am using unitronics Unistream plc, controlling two axis X and Y of polishing machine. Control is very simple as I have movement in each...
Replies
34
Views
3,921
Back
Top Bottom