photovoltaic

Control Logix GSV request

7 posts in this topic

I am making an AOI and it needs to detect the type of platform it is being run on (Control vs Compact). I have found a way to retrieve the Device Name using GSV but I only have a compact logix at my disposal. I am looking for someone to run the below line of code and cut and paste the contents of the string. The more the merrier:

 

Thanks in advance

Capture.PNG

Share this post


Link to post
Share on other sites

I would expect the ProductCode value from  the ControllerDevice to be a lot easier to use--and it is publicly documented (in the general instruction set manual).  And you can look in any processor's EDS file for new entries.  Define a constant boolean array to signal whether a CompactLogix or not.

Share this post


Link to post
Share on other sites

Might I suggest you use a full string rather than 40.  It's lost the 176 at beginning of controller part number.

Share this post


Link to post
Share on other sites

The same general instruction set manual says the first byte of that device name is a string length.  When under 32, that can scramble display.

Edit:  Actually, it is documented to be an SINT[33] array, so that byte and the following 3 characters will be lost writing into a STRING type.

Edited by pturmel
1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, pcmccartney1 said:

Might I suggest you use a full string rather than 40.  It's lost the 176 at beginning of controller part number.

Same result with a full string, but like pturmel said it is SINT[33]

I think I'm going to use the SINT method and just look at the 9 or the 6. in the 4th index

Share this post


Link to post
Share on other sites

The length of the string might differ by device;  mine was 20 bytes, not 33.   I agree that it might be simpler to get the Device Code from that identity object, and use its value against a table of known CPUs you can update.

That list is on Page 194 of the 1756-RM003 reference manual:
https://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1756-rm003_-en-p.pdf


Here's the results from my testbench:

L61_DeviceName.png

Edited by Ken Roach

Share this post


Link to post
Share on other sites
On 1/25/2022 at 3:41 PM, Ken Roach said:

The length of the string might differ by device;  mine was 20 bytes, not 33.   I agree that it might be simpler to get the Device Code from that identity object, and use its value against a table of known CPUs you can update.

That list is on Page 194 of the 1756-RM003 reference manual:
https://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1756-rm003_-en-p.pdf


Here's the results from my testbench:

L61_DeviceName.png

Thanks Ken, this is very helpful.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now