Jump to content

Modbus Communication between V700 and weighing Indicator


Recommended Posts

Hi guys,

I'm having a little problem here...I have a V700 and a weighing indicator XT1000 (www.thames-side.com). I'm using modbus RTU communication between these to devices.

I have prepared my code and it seams that I have communication established, but still I can't read any data from the weighing indicator. I'm not sure where my mistake is...Is it by defining the reading registers or the length or ... Because at the output from Modbus R.I.R FB I'm not getting any error, i.e I'm getting for the Status Message "0", which means Status is OK and from MODBUS CONFIG FB Out Variable "Function in Progress" I'm getting also "0", that means the PLC and the Indicator have established the communication.

Can someone from you guys help me? Or just to refer me where should I look for my mistake...

I'm attaching the Project that I have and a Manual from the Weighing indicator.

Vaga_Funkcionira.vlp UPUTSTVO-ZA-INDIKATOR-VAGA-XT1000-SA-PROTOKOLOM-KOMUNIKACIJE-MODBUS (1).pdf

Link to comment
Share on other sites

  • MVP 2023

You need to change all your SB 2 contacts to Direct Contacts, not Inverted Contacts. You are continuously initializing your configurations on every scan, except the first. It won't work that way. I didn't go any further than that. If it still doesn't work after you fix that then report back and we'll take another look.

Link to comment
Share on other sites

  • MVP 2023

Okay, I see another issue. You are reading 65 registers. When you place those registers into MI 1, you need to also have a vector of 65 registers (The values will go into MI 1 - MI 65). You seem to somehow be assuming all 65 registers will be stored in a single MI. You have other values that are stepping on that vector (such as MI 4 - Status Messages). And you are storing MI 3 into MI 10, which is also part of the vector you are reading from the weigher. One other thing, it appears you SET MB 3 to perform your MODBUS read. That's good, but you need to RESET it at the end of the MODBUS read function, otherwise you are trying to read on every scan and that won't work.

Link to comment
Share on other sites

18 minutes ago, Flex727 said:

Okay, I see another issue. You are reading 65 registers. When you place those registers into MI 1, you need to also have a vector of 65 registers (The values will go into MI 1 - MI 65). You seem to somehow be assuming all 65 registers will be stored in a single MI. You have other values that are stepping on that vector (such as MI 4 - Status Messages). And you are storing MI 3 into MI 10, which is also part of the vector you are reading from the weigher. One other thing, it appears you SET MB 3 to perform your MODBUS read. That's good, but you need to RESET it at the end of the MODBUS read function, otherwise you are trying to read on every scan and that won't work.

Hi Flex, thanks for the answer...but it's not clear for me, when you say that I'm reading 65 registers... How do I do that? Where can I see that?

According to me: If you go to page 85 from the Manual from the indicator (6.5.10.2 Input Registers) all I want to do is to read from Address Register 30010, i.e Dec 9. That's why in Unitronics Software R.I.R FB for Start of Vector I have "9", pointing to this start address. And for Vector Lenght I have "2", pointing to the Lenght of 2 Words (from the Manual of the Indicator for Address Dec 9 and Lenght 2 Word).

Is my logic complete false or?

Link to comment
Share on other sites

Hi,

yes, ok... I probably send the version of the software with this values... I was triying something, that's why...

But instead of that, in Start of Vector I have "9", refering to the Address of "DEC 9" from the Manual and for Lenght I have "2", refering to the lenght of 2 Words from the Manual. And also I have a reset MB3, at the end of this network, i.e after the R.I.R FB.

image.thumb.png.edd36002afd820ef31cc0caca8aa0007.png

Edited by Drozerce
Adding a Printscreen, for clarification...
Link to comment
Share on other sites

  • MVP 2023

Two things:

In ladder rung 2 you are trying to activate a timer coil with SB 2. That won't work. A Delay Timer (TD) requires power flow to keep it activated for the full 2 seconds.

Further, you are attempting to place two separate logic threads into a single ladder rung. Don't do that.

You also need your timer to be self-resetting, or it will only activate once. I would also place a contact in front so you can turn your reading on and off. Your code for rung 2 should look something like this:

image.png.d284ee34cdaeecbdbfa176a1b9f49b6d.png

Turn on MB 0 (or MB of your choice) to start reading every 2 seconds. Turn off MB 0 to stop. You can leave off MB 0 if you wish - it's not absolutely necessary, but gives you some added control.

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