Omron PLCs and Tags List

423 views
Skip to first unread message

Kaveh Asalian

unread,
May 17, 2021, 11:17:19 AM5/17/21
to libplctag

Hi everyone,

Does the library support doing a tag list with Omron PLCs?  I have been looking at the list_tags.c program  and have not been able to get it to work with Omron PLCs.

 

I have modified this program to use the following attributes (only changed the cpu to omron-njnx):

    if(!program || strlen(program) == 0) {

        snprintf(tag_string, TAG_STRING_SIZE-1,"protocol=ab-eip&gateway=%s&path=%s&cpu=omron-njnx&name=@tags", plc_ip, path);

    } else {

        snprintf(tag_string, TAG_STRING_SIZE-1,"protocol=ab-eip&gateway=%s&path=%s&cpu=omron-njnx&name=%s.@tags", plc_ip, path, program);

    }


and then tried running it using:

 

./list_tags 192.168.1.4  18,192.168.1.4

 

But I consistently get

Unable to open tag!  Return code PLCTAG_ERR_NOT_FOUND

It seems that it does not understand name=@tags

Thank you everyone

Jochen Haar

unread,
May 18, 2021, 7:50:26 AM5/18/21
to libplctag
Hi,

please download this Ethernet/IP-DeviceScanner and Browser from the following link: https://jochen-haar.de/index.php/s/R5neH9Zw7Z7G47d.

There is no installation needed - just download and extract.

- The application is broadcasting for Ethernet/IP devices over all your network adapters. 
- The responding devices are shown in a ListControl. 
- By double-clicking an item/device, the Browse dialogue will be opened.
- By clicking the Browse-button, the application is exploring the complete Tag space of the device - Controller-Tags, Program-Tags and Structured Tags

This application is tested with AB ControlLogix and CompactLogix connected to the PLC-onboard Ethernet adapter.

I am not able to guarantee that it will be working with OMRON, as I don't have such a controller - but a test might be worthwhile to do.

If you see any tags of the controller with this application, you should also be able to see all plain controller tags with the "list_tags.c" program.

Best regards
Jochen

Kaveh Asalian

unread,
May 18, 2021, 10:40:53 AM5/18/21
to libplctag
Thank you Jochen, I was hoping to get the list of tags programmatically from the Omron PLC for some process automation.  Is there an API to the Device Scanner program above?

Jochen Haar

unread,
May 18, 2021, 11:25:43 AM5/18/21
to libplctag

Kyle

unread,
May 18, 2021, 11:55:29 AM5/18/21
to libplctag
Thanks, Jochen.   Even testing the list_tags.c program will quickly let you know if listing tags works.   It is not on many PLCs.   As far as I know, the only ones to support it are ControlLogix and CompactLogix.  Even Micro800 may not support it.

Best,
Kyle
Reply all
Reply to author
Forward
0 new messages