Jump to content

Sending of signal states by ethernet


Recommended Posts

Good afternoon, I have a concern, I have some variables that I need to send from an mj20 et1 PLC, I am using the U90 ladder software, the question that is going to monitor all the variables contained in the program, but for this I need to send the states of the variables to a gateway through the Ethernet card,(It should be noted that I have the mj20 et1 module), I wanted to ask if there is a way to make a table with the variables that I want to send or if there is another way, Thank you. 

Link to comment
Share on other sites

On 8/26/2023 at 12:48 AM, kratmel said:

You must read Help topic about possible Ethernet communication via Jazz2 PLC: 

Ethernet: Jazz 2 only

You can run MODBUS master or slave.  Please find sample U90 project for JZ20 in help menu MODBUS folder.

Ready I understand this, but how can I select which variables I can read, in other software there are tables where the variables I need are added, in u90 ladder I did not see this tool, are the marks that I have using automatically passed? thank you.

Link to comment
Share on other sites

  • MVP 2023

Any communication involves the interaction of two devices.

Looking at the Jazz PLC, you can make it a Modbus TCP Slave and read everything you are interested in according to the table in the help.

modbus3.jpg.50fdf5e09a4f13e7aa39880ee8c65a4e.jpg

If you want the PLC to be the Master, you need to know the parameters (addresses) of the device cells where the PLC can write something.

Your question about being able to send something over the Ethernet is a bit incomplete. Describe in detail what and where you need to transfer and read about the possible ways of interaction in PLC Jazz20.

It is the cheapest of the Unitronics controllers and its networking capabilities are very limited.

Therefore, either you use the existing Modbus TCP protocol, or you have to choose another more network-oriented Unistream PLC.

Link to comment
Share on other sites

  • MVP 2023
On 8/25/2023 at 2:02 PM, BastianPIA said:

I wanted to ask if there is a way to make a table with the variables

Just to clarify, there is no "table".   You can read the entire memory of the Jazz via Modbus; you just need to know the MI or MB addresses you are interested in.

Can you describe your application in more detail?  Are you reading from the PLC with SCADA software or another application (Modbus slave)?  Or do you want the Jazz to write to another device (Modbus Master)?

Joe T.

Link to comment
Share on other sites

Hi;

To Expand a bit on Joe's comments.

JAZZ  - U90 Ladder does not have the type of tables you are looking for. 

                      You can saythat  all MI  or all MB  are a table, but you are only in some tiny portion .

You can read   MI's and MB's individually ,    but many Modbus calls will be required to grab the data  individually

When there are several to be read or written to at one time,  then Group them into a specific range of MI or MB

       so 1 Modbus call will read the range or write the range ( so consider this range as the table)

 

If your program has  the data all over the place, you can use   the Store   commands  to put  or read  the data in the range for Modbus  Read  / Writes.

 ( do   reads  at the beginning      and   writes at the bottom of the ladder)

 

DanT

 

Link to comment
Share on other sites

Hello, thank you all for your answers, to describe a little more about my application, through the JZ20-J-R31 PLC (in charge of managing some motors and having some variables with the status of each motor that it commands) together with the card ethernet mj20 et1 I want to connect with a gateway through the Modbus TCP protocol to pass the data of the status variables and monitor the status of the motors online, in the cloud (very similar to a scada but on a smaller scale and more simple without control, only monitoring), so my question is, the PLC would work as a Slave and the gateway as a master, if I want to read the marks from M20-to M50, can I select somewhere this range of variables so that I can do it? read from the gateway, or would it depend on the gateway's configuration to read the variables I need. Thank you I hope I have been clear with my application, I have attached the configuration I have so far.

image.png

Link to comment
Share on other sites

  • MVP 2023

Just a couple of comments:

- You don't need SB 1 where you have placed it.

- Do NOT place multiple unconnected logic threads in a single ladder rung.

- Your timer will count 30 seconds one single time then the out bit will stay on as long as the PLC is powered on. Is that what you want?

Link to comment
Share on other sites

17 minutes ago, Flex727 said:

Solo un par de comentarios:

- No necesita SB 1 donde lo ha colocado.

- NO coloque múltiples subprocesos lógicos no conectados en un solo peldaño de escalera.

- Su temporizador contará 30 segundos una sola vez y luego el bit de salida permanecerá encendido mientras el PLC esté encendido. ¿Es eso lo que quieres?

I understand, I have already made the corrections, with respect to the program, I have not yet developed more of the logic hoping to resolve the question about how to read the variables from a Gateway, or with that configuration the PLC remains open to be read from the master, and that's it Is it up to this Master to choose which variables to read from the PLC?

Link to comment
Share on other sites

  • MVP 2023
23 hours ago, BastianPIA said:

if I want to read the marks from M20-to M50

I'm guessing these are motor status bits.  If not please clarify.

If so, then just write logic to turn on and off an MB with each one.  Then your gateway will "read coils" and the address will be the same as the MB address and you can read them all in a block.

Is the gateway a commercial product or something you've developed in house?

 

Joe T. 

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

I would like to ask some help as I can see that in this topic there is plenty of information regarding how to use a  JZ20-J-R16 as Modbus TCP Slave.

I am able to read all the MI's and MB's, but I can't read I0-I7 (inputs) and O0 to O6 (outputs). (I am able to read analogue input as MI0).

My question is how can I read the input and the output states through a Modbus TCP call?

What I tried to read in I2 and I3: 

ReadDiscreteInputs(35003, 2)

answer was:

illegal data address

The communication in bytes:

modbus: sending 00 01 00 00 00 06 01 02 88 bb 00 02

modbus: received 00 01 00 00 00 03 01 82 02

I also tried:

ReadCoils(35003, 2)

answer was:

illegal data address

The communication in bytes:

modbus: sending 00 02 00 00 00 06 01 01 88 bb 00 02

modbus: received 00 02 00 00 00 03 01 81 02

 

Any help is appreciated!

Link to comment
Share on other sites

  • MVP 2023

@BastianPIA - You've followed the example to configure the Jazz for Modbus serial communications.  I don't think this is what you want.

Look in the Help for Modbus and click on the link for Modbus/TCP -> Ethernet: Jazz 2 only.  You'll see there is a dialog box specifically for Ethernet communication setup.

Joe T.

 

Link to comment
Share on other sites

Hello 

7 hours ago, Ausman said:

Have you fully read the entire Help file listed as MODBUS in U90 Help index?

cheers, Aus

Yes, I have fully read it and that is why I had my questions about Modbus. In the meanwhile, I was able to get out the needed information by misregarding the text about adding 30000 or 40000 to the vector address (which is simply not true because by using the different Modbus commands there is nothing to add). So, 

 

7 hours ago, Joe Tauser said:

Inputs start at Modbus address 04000 on a Jazz.

Have you tried ReadCoils(4002),2  ?

image.png.00fd471d4c3857b517dc876ad4e397ae.png

 

Joe T.

 ReadCoils(4001,2) works. And so does ReadDiscreteInputs(4001,2) giving the same result. The same is true for ReadCoils(5001,2) and ReadDiscreteInputs(5001,2). And that is a bit confusing as ReadDiscreteInputs is supposed to be available to read inputs, while ReadCoils is for setting and reading outputs. But anyway, the good news is that it works! Thanks for your reply!

Link to comment
Share on other sites

  • MVP 2023
16 hours ago, gkovacs said:

Yes, I have fully read it and that is why I had my questions about Modbus.

The Slave Address table that Joe posted is part of the Help page I asked you about.  Rather than do screenshots I thought it would be wise for you to know the page location for an indepth read. 

Help generally has all the info one needs, but sometimes does need deep digging.

cheers, Aus

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