Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MicroLogix 1400 : plc_tag_create return PLCTAG_ERR_BAD_PARAM #416

Open
DamienPim opened this issue Sep 12, 2024 · 4 comments
Open

MicroLogix 1400 : plc_tag_create return PLCTAG_ERR_BAD_PARAM #416

DamienPim opened this issue Sep 12, 2024 · 4 comments

Comments

@DamienPim
Copy link

Hello, I can't get libplctag to work with MicroLogix 1400.
I use libplctag 1.5.2 and libplctag.NativeImport in a VS2022 C# project.
I call plc_tag_create with following UniqueKey:
"protocol=ab_eip&gateway=192.168.0.98&cpu=MicroLogix&elem_size=1&elem_count=1&name=Bit_1"
but I get PLCTAG_ERR_BAD_PARAM error.
For cpu, I see that I can use MicroLogix because in get_plc_type, stricmp is used to compare cputypes...
Can anyone help me?
Has anyone tried libplctag with a MicroLogix 1400 ?
Thank you in advance.

@timyhac
Copy link
Collaborator

timyhac commented Sep 12, 2024

Searching existing issues for "MicroLogix 1400" yields that someone has had some success already: https://github.com/search?q=repo%3Alibplctag%2Flibplctag.NET+micrologix+1400&type=issues

Can you please turn on debugging to level 4, and provide other information such as a code snippet of what you have tried, and let us know if you have been able to get something working, even if it isn't the final result you're looking for.

Unpacking what you are saying:

  • Your application is a C# .NET Core application (which framework version?)
  • Both the libplctag package (v1.5.2) and the libplctag.NativeImport package (only as a transitive reference? If not, which version?) have been added to the application.
  • Within your code you have a call to plc_tag_create and you pass in an attribute string of "protocol=ab_eip&gateway=192.168.0.98&cpu=MicroLogix&elem_size=1&elem_count=1&name=Bit_1".
  • You want to be able to write cpu=MicroLogix instead of cpu=micrologix.

I note the attribute string doesn't specify the path, is that correct?

@DamienPim
Copy link
Author

I don't specify path because I see that it is not used for MicroLogix PLC.
I write MicroLogix and not micrologix because I see a case insensitive comparison.
Both the libplctag package (v1.5.2) and the libplctag.NativeImport package (v1.0.41) have been added to the application.
C# .Net Framework 4.6.2. Tests on Windows 10.
The MicroLogix1400 on which I can make tests will be no longer available after this afternoon. I have to find another MicroLogix PLC to continue my tests...
Thank again for your help.

@kyle-github
Copy link
Member

name=Bit_1 is not a valid DF1/PCCC data file reference. B42:0/1 is.

That said, the debug file will help a lot.

@DamienPim
Copy link
Author

The MicroLogix1400 on which I can make tests is no longer available. I have find another MicroLogix but I don't yet received it.
I will come back with results ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants