Hi!
I reset all management parameters everytime before plc program calls read_var or write_Var block. I have used separate management
parameters to every read/write_var block, but using same management parameters to all read_var block is ok, if you don't call
multiple read_var blocks same time. (I think that you can call up to 8 read or write_var blocks same time, but I call only one
block at time. How many blocks you can call same time depends of hardwire)
Timeout value is also defined on hardware properties like you said, but you can set timeout value to smaller via plc
program/managemet parameters. If you leave timeout value to zero (Most significant byte of third management parameter) => PLC
program uses timeout value from hardware properties (same place, where you can change baudrate, parity etc.)
Activity bit is first bit of first management parameter. (least signifant bit of first parameter). You are right, activity bit
should automatically reseted back to "0" after timeout by read_Var block , but sometimes activity bit remais it's "1" state also
after timeout and communications magically stops, if activity bits are condition to call communication blocks. So I have programmed
separate reset for activity bit. (Force reset)
ex. hardware timeout is 1s, but if activity bit is true for 10s of some reason, which it shouldn't be possible => PLC program
resets activity bit and communication starts again.
Take a look to help files of Unity, if you look read_var help file from communications library, you can see example which is writed
on ST format, you can also use find command: "Example including execution check" and you should find example of using read_var
block... Anyway using read and write block on unity is little bit tricky, I have learned most of this by doing
If you search management parameters from help files, you should find documention, which tells meaning of every management
parameter.
P.s If second management parameter have value 16#0004 it means incorrect destination addrees error
(managemt parameters are mux of two different bytes, least and most signifant byte have different meaning, so you should divide
management parameters to seperate bytes before you look them. Second management is mux of communication report (least
significant byte) and Operation report (most significant byte).