Thanks Aciera. I used a utility called
mbpoll
and this bash script to attempt reads from every register, and I always get the same reply
Code:
#!/bin/bash
for i in {0..65535}
do
mbpoll -b 9600 -1 -P none -r $i -t 4 -v /dev/ttyUSB0
done
Example run:
Code:
chris@cnc:~$ ./test.sh &> out.txt
chris@cnc:~$ grep "failed" out.txt | wc -l
65535
So I guess my problem is not actually related to vfdmod. The VFD is simply rejecting all attempts to even
read any register whatsoever.
fwiw I read the VFD manual from cover to cover three times searching for any mention of modbus/RS485 and changed all related parameters as necessary, like this (for YL620):
P00,01 Start/stop command source -> 3: Motor controlled by Modbus RS485
P03.00 RS485 baud rate -> 3: 9600bps
P03.01 RS485 address -> 1
P03.02 RS485 format -> 2: 8N1
P07.08 1st frequency selection source -> 5: Modbus RS485 given frequency
Setting the first one prevents me from using the onboard panel to start/stop the motor, so I can tell it is having some effect. The P03 ones are also taking effect because if I don't match them with parameters used by the master then the connection doesn't work at all. The last one (P07.08) I can't really check until the other problems are solved, but I set it to RS485 anyway. I wonder if there is some setting needed that is not mentioned in the manual - that would not surprise me since it's a pretty crap manual, and I've seen other people say that their manual didn't even mention the P00.01 option of 3 as above.
Anyway I've been struggling with this for 16 hours straight now and questioning if it's even worth it, need some sleep...