Modicon M340 Modbus TCP Communication

Join Date
Feb 2008
Location
Walnuc Creek, CA
Posts
31
Hello, I'm brand new to Modbus. I've been trying to get the syntax correct for reading/writing data from a M340 over Modbus TCP (from the processor) and am amazed by the lack of resources.


I'm ultimately trying to send commands to a slave device that allows the reading of process values and writing of parameters via Modbus.

First of all, should I be using READ_VAR and WRITE_VAR? That's what I'm trying to work with. I found an example in the help file that seemed to specify the below syntax:

Addr_Array := ADDM('Ethernet_1{192.168.1.100}');
WRITE_VAR (
ADR := Addr_Array,
OBJ := '%MW',
NUM := 1,
NB := 2,
EMIS := Value_Array,
GEST := %MW200:4
);

Where Ethernet_1 is the Ethernet network interface for the M340, connected to a device with address 192.168.1.100. '%MW' is the type of object (internal word), 1 is the address of the first object to write, 2 is the number of consecutive objects to write, Value_Array is an integer array of size 2, and %MW200:4 should be an INT table of size 4.

First off, is this syntax correct? I haven't yet been able to get it to work.

Second off, I get errors:

{Main : [MAST]} : (l: 5, c: 5) E1208 usage of dynamic arrays is disabled
{Main : [MAST]} : (l: 9, c: 5) E1208 usage of dynamic arrays is disabled
{Main : [MAST]} : (l: 10, c: 5) E1208 usage of dynamic arrays is disabled
{Main : [MAST]} : (l: 10, c: 20) E1200 usage of directly represented array variables is disabled

I know I can get rid of these errors by changing the preferences.. but what gives? What am I supposed to be doing to address things correctly if neither of these formats works? Any information about this would be very much appreciated.

Thank you in advance.
 
To correct this, go to Tools - Project Settings - General - Variables .
Turn on 'Directly represented array variables' and 'Allow dynamic arrays (ANY_ARRAY_XXX)'.
 
You will find io scanning much easier (assuming you are using a NOE module) just fill in the table and you are done
 
ty from Turkey

To correct this, go to Tools - Project Settings - General - Variables .
Turn on 'Directly represented array variables' and 'Allow dynamic arrays (ANY_ARRAY_XXX)'.


ty dude. i am trying to solve that error code for a day. and i found your reply then fixed the problem. thank you very much.
 

Similar Topics

Hello, For my project I have to read and write coils/registers of Scheider Modicon M340 PLC. To do so, I decided to use a python script based on...
Replies
2
Views
4,849
I have a PLC rack with an M340 processor (BMXP342020). Using Unity Pro 7. My task is to interface to a Modbus plus network. Do you know of any...
Replies
2
Views
2,118
Hello, I am currently working on a project on Modbus TCP communication between a Modicon M340 PLC and an electronic card with a DSP Texas...
Replies
13
Views
20,212
Hi, We need to setup Modbus TCP/IP communication between "BMX NOE 0110" (Modicon M340 module) and "IC695ETM001" (GE PAC RX3i module). Manuals say...
Replies
7
Views
5,939
Hi, I am trying to communicate modicon M340 PLC with an Schneider T200 Remote main unit controller over modbus TCP. the PLC has got in built...
Replies
5
Views
5,152
Back
Top Bottom