Jump to content

Recommended Posts

Hello,

I've recently acquired the UCR-ST-B8 router from Unitronics. The set-up was easy but it won't communicate with other devices.

My goal is that the router is connected to a PLC through a direct ethernet cable and that the PLC can read the status of the router, effectivly making the router a slave of the PLC.
I also want to recieve SMS messages on the router and the PLC to read those messages.

*Note I did change the IP from 192.168.1.1 to 192.168.0.1

1543250410_Screenshot1.png.b5a0a24c9cd7e59e03b197b2532fd5df.png

With a cable in LAN 1 of the router and the other end in a laptop we can connect to the webUI. Here (Services-->Modbus) I've configured the router as a modbusTCP slave and did save the settings.

250484837_Screenshot2.thumb.png.865a27c35f501c7249d6d0cd9fb97a0d.png

After this I close the webUI and connect to the router using QModMaster (https://sourceforge.net/projects/qmodmaster/).

With this program I should be able to read the registers of the router. (I know this works as I've used it before)
But when I try to read the registers it doesn't get a return signal.

394468266_Screenshot6.thumb.jpg.69bc30c5a4c35aa363a018dc2525071e.jpg

After this I've tried it using a PLC.
But I am not really familliar with the Unilogic enviroment so I'm having a bit of trouble setting it up.

As stated earlyer I want to read the data from the router and recieve SMS messages from the router and read those using the PLC.
Would I need to setup the router as a router or as a modem in the Unilogic enviroment?

1930682422_Screenshot5.jpg.46ad96da954d3ab1a6e5ad771d444427.jpg

Further if I set it up as a router would I need to take extra steps to read out the UCR-ST-B8 or should I be able to read all the data immediately?

So the questions I have are:
How do I read out the router?  What settings need to be configured.
Is it possible to read the data using a PLC?  I'm using a USC-B5-T24 and how would I do that.
Should I use ModbusTCP or Modbus RTU rs485?

 

 

 

 

Link to comment
Share on other sites

  • 1 month later...

Hi Weert,

Just FYI, I'm no expert, I just saw your post when searching for answers on something similar and thought i'd try to help.  I would recommend setting the Router to modbus TCP slave.  In unilogic modbus is handled a couple different ways and the manual does a decent job of explaining it.  I would recommend setting the PLC up as a modbus TCP master and using the periodic function.  You could use aperiodic, which is controlled by PLC logic, depends on how often you want to obtain the data from the router.  Aperiodic is good for immediate reads or writes but you'll have to set up a pole timer in your logic if you have more than one aperiodic trigger so that there is at least 50ms between them.  In the periodic table set under in the read/write registers tab fill in the required fields. Don't use read/write multiple as the UCR does not support this.  Assign tags to the data you are trying to obtain and ensure the data type matches what is in the router (typically 16bit INT).  You can specify an array if you want to read more than one register so long as the addresses you want are in sequential order.  The UCR manual has a section explaining the modbus register addresses for all the different data points.  Enter the starting address and if you are using an array it will read the next addresses for the length of the array.  There is a maximum read length (i think its 16 registers) so of you are reading more than that just add another periodic row and start where you left off with another array.  If you are just trying to read a few scattered data points then set up a row for each one separately instead of using an array. If you are trying to control the UCR over modbus you will need to "write" to the registers.  You should also check that the UCR supports that command (I'm not sure because i only needed to read) .  Use ladder logic to control the content of the tags.

I've done this with unilogic PLC and UCR B4.  I'm just reading a few registers every second or so.  My issue, that i was originally searching for an answer for, is that every second comm would fail with modbus error 11 which seems to be specific to routers.  I'm not sure why its doing that.  Everthing works i just get my data every second read.  Its just something i want to eventually figure out for my own sanity.

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...