Hi,
I have configured my CR1000 as a ModbusSlave and want to read out the data with an RS232 cable directly connected to my PC (COM1), using Simply Modbus Master program.
Is this configuration generally possible and what are the mistakes I could have made right know, because it didn't work so far.
Between two CR1000 it was very easy to establish a ModBus communication via ModbusSlave and ModbusMaster commands, but with the PC it doesn't work so far. My Slave program is
Public PTemp, batt_volt,ModResult,I
Public ModIn(4)
'Main Program
BeginProg
ModbusSlave (ComRS232,9600,1,ModIn(),0)
Scan (1,Sec,0,0)
PanelTemp (PTemp,_50Hz)
Battery (batt_volt)
'Enter other measurement instructions
'Call Output Tables
'Example:
ModIn(1) = batt_volt
ModIn(2) = PTemp
ModIn(3) = ModResult
NextScan
Thanks for your help
Ansgar
Look at the Modbus result code you receive in your software. That will most likely tell you what is going on.
Look at the register offset as described in the help for ModbusSlave. The PC probably requires you to input the first register location as 40001.