I'm facing issue with porting modbus library into renesas platform .
I have seen post on forum but found not so useful .
Appreciate if someone can share their experience working with rs485 terminal of S5D9.
In reply to Kirti:
1) As per the modpoll documentation, -r start reference
2) modpoll sends function code 16 (write multiple holding registers) even if only 1 write value is given to modpoll
In reply to Jeremy:
for single write register ,I sent command as -m rtu -a 10 -r 1 -t 4 -b 9600 -d 8 -p even COM4 6 so this function eBFuncWriteHoldingRegister is expected to execute but eMBFuncWriteMultipleHoldingRegister exception gets executed.
1.am I sending wrong command for single write register ?
2.by what value the reference is updated because in modpoll command there is no value specified by which the refrence should be updated (it just send function code but no new value/data) like how we do in modscan software.
As per the modpoll documentation :-
-r is the start reference (red arrow) the write value is the blue arrow.
Modpoll seems to always send write multpile holding register command
Please correct my understanding if wrong
1.read holding register command: -m rtu -a 10 -r 1 -c10 -t 4 -b 9600 -d 8 -p even COM4 (reading references starting from 1 to 10 )
2.write holding register : -m rtu -a 10 -r 2 -t 4 -b 9600 -d 8 -p even COM4 160(write refreence 2 by value 160)
so in only one debug session I tried following points
1.By sending command mentioned in point 2 I wrote reference 2 by 160 got written(1 reference written) so to check its really got written I sent read command in same debug session as mentioned in point 1 so that references from 1 to 10 can be read with reference 2 updated by 160 but modpoll shows respose as below
does modpoll write only one reference at a time ?
In one debug session ,not getting response for all the command,timeout error received.(requires some delay or need to reduce timer count)
Will freemodbus work with modscan64 tool(doesnot require command, requires to select slaveid, baudrate,function code ,com port,mode available from drop down option) ?-It can write multiple references at a time .
I believe You are the right person to help me on this...
modpoll and freemodbus are not Renesas products, you have exactly the same information on them as I have.
The write values are given after the options and serial port for RTU :-
In reply to Yogesh-In: