Jump to content

Setting up I/O keyence IO module.


Dbroker42

Recommended Posts

Ive been fighting for 3 days getting Keyence NQ-MP8L to work. After talking with them they are saying I need to do some sort of conversion in Unilogic to get the results I want. 

I have 5 of their modules that I'm just trying to read Digital Inputs from. When I set them Up with the EDS file it sets up as UINT16 instead of Bit. It stores it in my IO tab and populates the following values. IData_1_0 with 128

IData_1_1 with 418

IData1_2 with 21845

I get readings off it because my values change depending on what input I gain or lose. 

 

This is my first time using Unilogic and I'm just not seeing how I convert those values to simple Input readings. When I use the EDS file it grays out the Input tag option. So I'm not able to put them in the premade structures. 

Screenshot 2024-09-25 133257.png

Screenshot (3).png

Link to comment
Share on other sites

  • MVP 2023

You're not giving us the background on what you're expecting.  You have 5 modules but you're not telling us what's connected to what port and whether it's on or not.

It looks like it's stacking the inputs as bits in a 16 bit word.  Word 0 with value decimal 128 translates to a bit pattern of 1000 0000.  Do you have more information (like a bitmap in the EDS file) that may translate this for us?

In the end, you'll need to map the UINT16 to a bit array to access the individual bits.  Create a two byte Buffer array tag and use the Tag->Buffer instruction to load it, then create a 16 element bit array and use the Buffer->Tag instruction to copy the bits from the Buffer to your bit array.

 

Joe T.

Link to comment
Share on other sites

I was able to get it working Unitronics support suggested I use a NUM to BIT function. 

The problem resided in that I was not able to change the Input tag to the structure that was created because it being greyed out. So, I had to put the function command in to change it over from UINT16 to Bits so I could read the inputs from sensors more clearly.

Previous programs were done straight from the scanner and the input tag was the structure itself. Only way I had that option was to put the scanner data in manually instead of through an EDS file but every time I did that the PLC would no longer receive data at all from the IO module or to the valve stacks. Both modules and valve stacks would throw a flag that there was no communication to them even though the PLC was able to ping them.

Screenshot (4).png

  • Upvote 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.