HMS-EN2SE-R configuration

I have a pretty simple application, but I’m struggling to understand how to configure my EN2SE-R. I have a device that talks RS-232C connected to the EN2SE-R. The EN2SE-R is on ethernet/IP connected to my ControlLogix PLC rack. I want to send the string “*TRG;:MEASURE?” to the device and then read in its response which is in this format - “1.0817E-03”. Can I get some pointers on how I should configure the EN2SE-R to accomplish this?

Thanks a lot! Feel free to email me a sample configuration -

Hi @neiladavis,

For very simple configurations, you can use Generic Data Mode, but generally, if you are going to be sending multiple commands with responses tied to them, you are going to want to use Master Mode:

image

Right click on your node and click ‘Add Transactions’ to create the command.
The command can either be stored in the Anybus or the data can be sent from PLC, depending on your preference.

image

“Constants” will be stored in the Anybus memory. For example, I can store the command “"$NM00000!” by creating 9 byte, Constants. I can send the command cyclically or upon a trigger sent from the PLC:

image

Alternatively, I could just create a memory area for the command, and then send the data in the command from the PLC. If I know the size of the command and it will always be the same size, I would select “Add Data” which gives me the options “Data Length” and “Data Location”. If the size will vary, I can select “Add variable Data”. I will have to set the location and the max size.

So for example, let’s say I select variable data with a max size of 20 bytes and Data location 0x0200. When this configuration is downloaded, it will map those 20 bytes to a PLC tag. You can put your command in that PLC tag and then depending on the Update mode (cyclic, trigger), that command will be sent to your serial device.

The Response part of the Transaction is similar. You can select the same data types. If the response is always going to be 4 bytes, you can select “Add Data”, set the size to 4 bytes, and the memory location in the Anybus. These 4 bytes will be mapped to a PLC tag. You could also use variable data.

There is a step-by-step guide for setting up the HMS-EN2SE-R here. Please let me know if you have any questions.

Kyle

Hi Kyle,

I set up my configuration with constants like you suggested. When I download to the module, it gives me the warning message below.

image001.jpg

When I then close the configuration manager, it asks me if I want to save the changes to my Logix5000 file – I say yes. However, I don’t see any tag data associated with the EN2SE-R module inside the Logix5000 software. All I see is a “ConnectionFaulted” bit shown below. (I named the module “comAS13” inside Logix5000).

image003.jpg

This is a screen shot of my configuration. It is also attached to this email.

image005.jpg

Any additional help is greatly appreciated,

image006.png

AS13.cfg (16 KB)

Hi Kyle,

I set up my configuration with constants like you suggested. When I download to the module, it gives me the warning message “The configuration contains neither default tags nor user defined tags”.

When I then close the configuration manager, it asks me if I want to save the changes to my Logix5000 file – I say yes. However, I don’t see any tag data associated with the EN2SE-R module inside the Logix5000 software. All I see is a “ConnectionFaulted” bit.

Any additional help is greatly appreciated…

Because you made all the data constants, there were no tags to store in the PLC. I changed the config to have a variable data block of 20 bytes to store the response (see attached). I assume that you want to store the response as a tag? Make sure to create the process tags (step 9 in the manual example).

AS13_2.cfg (16.0 KB)

I now see input tags in my Logix5000 program, but I don’t see any output tags. How can I trigger the query without any output tags?

Thanks,

Neil

You probably just need to change the trigger byte address to 0x200 (first register in Output Data):

Make sure to create a process tag for it!

Hi Kyle,

The query message is triggering and the device that I’m trying to communicate to is responding. But the message that it is responding with is gibberish. I’ve communicated with this device before using a Rockwell 5069-SERIAL module. I pasted the Rx setting for the 5069-SERIAL module below. Note how the response from the device uses a 0x0D and 0x0A (CR+LF] as the end of message delimiter:

image003.jpg

I haven’t found a way to use 2 characters as the end character value in the Configuration Manager software like I did above. I’ve tried using 0x0D and 0x0A as the end character value but the response from the device is still gibberish. Do you think this might be causing the problem?

image004.png

Finally, I just want to verify that the HMS-EN2SE-R module is compatible with the device that I’m trying to communicate with. This is the connection diagram from the manual of the device that I’m trying to communicate with (the device labeled 3511-50). In this diagram, the “Controller” is the HMS-EN2SE-R:

image006.jpg

This is the connection diagram from the HMS-EN2SE-R manual. These diagrams don’t appear to be compatible (especially since pin 4 is NC). Can you comment on this? I don’t see how I can ever get these devices talking correctly.

image010.jpg

Thanks,

Neil Davis

SDC

Can you provide the log of the raw coms? (Go to Tools > Start Logging)

It looks like you have the end character disabled:

image

Change to “End Character visible”.

Yes, our device is compatible with RS232 (rev C). I don’t think it’s a compatibility issue. Could possibly be a timing issue, but need more info from the logs.

Hi Kyle,

Here is the log file with several trigger events in it.

-Neil

log.txt (5.37 KB)

Can you just confirm that the command looks correct?

image

What is the response that you got using the Rockwell serial module (what are you expecting)?

Can you send me the latest config file?

The latest config file is attached. Yes, the output command is correct. I’m expecting a response in the format of “L 0.1234E-03,D 0.1234” terminated with [CR+LF].

-Neil

AS13.cfg (16 KB)

I switched it to just “End Character” for the object delimiter and it started working. Thank you very much for all your help!

image001.png

-Neil

OK great! Let me know if you have any other questions.

Kyle

Still have an issue where the HMS module is sending the query message multiple times before it get a response from the device. Does this have to do with the timers and retry count parameters for the query?

-Neil

Possibly. You could try increasing the Timeout time.

You are using a trigger byte, right?

Do the logs show a response or not?

If the logs show a response, but you aren’t seeing it in the PLC, try changing the Message delimeter. For example, try values between 10 and 200, starting at 10 and then gradually increasing to see if that fixes the issue.