Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus RTU - Help writing to single register

Greetings everyone,

 

I'm trying to communicate with an Omron E5CC (wish I had went with Watlow) via Modbus RTU using LabView.

I can communicate with with the PID controller just fine and could even read PV values off of it, however I can't seem to make writing a SV to work.

 

Using NI I/O trace, I can see that when sending PV read register command, it is sending the expected commands but for some reason, sending a write SV command ends up not sending the expected commands.

 

  • Set SV command -> expected is 0x 01 06 21 03 00 00 00 64 + CRC
    • vs. what I get -> 0x 01 06 2103 00 40 72 06

And I get the following errors:

Error 538184 occurred at an unidentified location

Possible reason(s):

Modbus Error: Server Device Failure.
Function 6

 My LabView code (also attached):

Trishkaishi_1-1718220532367.png

 

Also, here's a snippet of Omron's comms manual for the E5CC:

Trishkaishi_2-1718220587390.png

 

Any help is appreciated!

0 Kudos
Message 1 of 4
(208 Views)

I was able to spot this error at a glance: 0x64 <> 64

 

You had configured 0x40 as a set point instead of 0x64 (always use the radix if not decimal)

santo_13_0-1718222901704.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 4
(196 Views)

Thanks for pointing out the radix for me, it makes looking at LabView diagrams easier to read.

 

I did however corrected the issue you pointed out and got the correct output through I/O trace and I still were not able to change the SV on the controllers.

 

Trying to research a bit more into this problem, I found this guide here that suggests doing multiple holding register writes when setting the SV to the Omron E5CC. The command is 01 10 01 06 00 02 04 00 00 00 64. Note that 0x64 = 100°C.

 

I copied what they were suggesting and I got what I assume to be the correct command through I/O trace that matches theirs...

Trishkaishi_1-1718229337080.png

 

I/O trace:

Trishkaishi_2-1718229373802.png

 

Now I have completely no idea what is going on. I'm starting to think these Omrons I got from e-bay were fakes...

But of course I may be missing something.

 

The funny thing is, there's this guide here from plc247.com that shows my first script working...

 

 

 

0 Kudos
Message 3 of 4
(172 Views)

I figured out what the problem was. Omron E5CC has this setting called CMWt (Communications Write Enable/Disable) and is related to "Event Inputs" on the controller itself. I simply changed this from "off" to "on" and now I can write registers to the device!

 

I'm not sure why it's tied to event inputs but it looks like as long as I keep them (inputs) floating I can write to the device just fine. I'm also perplexed why such a crucial setting is not mentioned anywhere on their communication quick start guide nor their in-depth Modbus protocol communications guide for the E5CC.

0 Kudos
Message 4 of 4
(129 Views)