M340 Read_Var limitations?

NOM card settings
Master
Number of retries - 0
Answer Delay - 400 (x 10ms)
RS232
8-N-1
Delay between Frames 25ms

The address for Sta1 = '0.1.0.4'
 
I can talk to the remote site, I just can't seem to break the 4 word barrier... no matter how I address the registers, or arrays

I can start at 0 and read 0-3
I can start at 1 and read 1-4
I can start at 3 and read any 4 consecutive values
 
o_O Radios or direct cable?

You need to add activity bit before enabling communication block. Communiction block maybe sends several request now.
(add and-block with inverted activity bit (%MW4580.X0 before read_var enable input).
Sometimes error can be that new request is maded before previous request is finished.
Send new request only when all activity bits are zero.
(It is easier if you use same gest parameters for all com-blocks)
 
Last edited:
Write/Read blocks can be used with NOM card.

%MW300:16 is also right. 16 words starting from %MW300. So you can now read maximum 16 words form slave.

What is hardwire timeout setting on NOM card. I see that you have programmed timeout 50 on GEST array.
So you need less than this on NOM card (Retries 3*1000ms = 3s for starting.

What is sta-parameters (address)

It shouls be something addm('0.1.NOM_CH.slave_numb')

('Rack.Card.Channel.slave')

It's difficult to see but it thought the RECP pin had %MW300.16 not %MW300:16
 
Can you test with cable without radios.
If problem still exist then it is on program side. if not then on radios.

Which speed radios have and is problem still on if you lower speed.

If you look nom card leds it should only show one blink for transmit and one for response/modbus query

With lower speed you see easier if there is several led blinks on transmit for one slave. Then there can be collision of different querys and card gives error.
 
Lare, I think the problem is clearly with the logic which isn't checking the activity bit or even writing to the activity bit and exchange number to the management array at all. I have found if a READ_VAR block has a failed exchange it won't complete another one until the exchange is cancelled as the documentation indicates. If it is used incorrectly from the start sometimes the only way to get it to start working correctly is to make a new instance of the READ_VAR block.

I am surprised the logic in the screenshots posted works at all.

I think Krauly should start by importing the complete working example program section for using READ_VAR with serial that I linked to, or post screenshots of the logic which shows that the missing pieces you have pointed out have been addressed, or there is no point in troubleshooting the link when the logic is incomplete
 
Von Hydro.

Yeah, thinked same allready yesterday.

Read and write blocks can be pretty difficult for start.

Have managed to get it allways working and no errors even after several years of running on PLC.

I look activity bit before give reguest for block. Also before I call com block I zero all gest parameters (Only timeout have non zero value before calling)

Also using same gest parameter variables for all blocks (Schneider's recomendation on help files) and only one block can be on with serial communication so there is no probles for using same variables for all blocks.

Only ethernet can have multiple callings on same time

Looking also for activity bit if it gets jammed to "1" state, it can happen sometimes. If it happens I zero all gest parameters (which is pretty much same than cancel-command but easier).

No problems since.
 
Last edited:
I would have thought the logic was fine, seeing as a rep from Schneider actually helped set it up years ago on a different system that is still working.

The issue I have is the 4 word limit.

I think that what I may need to do is actually simplify the logic to just talk to 1 site and use only 1 Read_Var to test ability.
 
I actually have multiple Read_Vars and Write_Vars. The next one is triggered by the previous one's completion, whether successful or not. when an error is thrown it goes to a counter that after a preset amount of fails triggers an alarm.

There is only 1 tx/rx blink, and I can watch the progression via an animation table.
 

Similar Topics

Hi All, I need to read some data from a Rockwell 5380 PLC to a schnieder m340 PLC. What hardware will i require for both systems? on the M340...
Replies
12
Views
5,202
hi there! i am trying to read modbus registers in M340 PLC from a Turck BL20 Gateway. I have done this with a Emerson Gateway and everything...
Replies
1
Views
1,929
Hi all, Is it possible to read the amps of a motor from a connected TesysU over Modbus 485 using Unity Pro software?
Replies
2
Views
1,375
Hi everyone, i have a situation with a Modicon M340 PLC. I need to measure an external magnitude with a digital input. I'll be receiving pulses in...
Replies
4
Views
1,817
I'm using M340 (Schneider Electric) as modbus master. It works fine but if there is a disconnection with the slave, it stops working even after...
Replies
2
Views
367
Back
Top Bottom