Jump to content

Ethernet/IP


Flex727

Recommended Posts

  • MVP 2023

I am developing a project with a USC-B5-B1 PLC using UniLogic 1.33.373. I want this PLC to be a Ethernet/IP Adapter (Target) and provide data that is organized as a vector of 30 bits that it has collected from elsewhere. When I try to create the Adapter Node, I get an error message in the Output Size column that says "Mismatch: a bit vector must be in multiples of 8 to accommodate bytes."

What would be the best or proper way to set this up? Do I need to copy the data to 4 other vectors of 8 bits each, or just list each of the 30 coils individually, or what? It will not let me select a single element of the vector.

image.thumb.png.9db06b9667404d7ef530c8066cde5a72.png

(Edited to add screen cap)

Link to comment
Share on other sites

I think it may be easier to manipulate the data at the other end, if each coil had an integer associated with it. Coil is OFF, write 0 to integer(INT8). Coil is ON, write 1 to integer. Reverse the operation at receiving end to get back to bit data. Its a bit more code to write, but not to complicated.

After some more thought.....while I think that should work, I don't think its the "proper" way to do it. I'm not sure how you gathered the bit data together, but can you make the vector length 32 bits and just include a few dummy bits?

  • Thanks 1
Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.