C
Hello All,
I am creating an embedded device that works using Mod Bus. Everything is progressing rather smoothly. I just finished the Mod Bus function (0x01) Read Coils. I was about to start on the next one, but it seems that it is the same as the first one. I am trying to match up data to the Mod Bus commands, but all the documentation is not very clear on the subject.
The device will have:
Digital Inputs - DIN (x8)
Digital Outputs - DOUT (x8)
Analog Inputs - AIN (x8)
Analog Outputs - AOUT (x8)
Various data for setting things up like baud rate,parity, process variables, etc. that the user can change.
Various data like the firmware number that the user can read but cannot change.
By my estimates, I think that this is the right approach to take:
DIN : (0x02) Read Discrete Inputs
DOUT : (0x01) Read Coils
AIN : (0x04) Read Input Registers
AOUT : (0x03) Read Holding Registers
Process variables : (0x03) Read Holding Registers
Firmware number : (0x04) Read Input Registers
I guess I am not clear on Coils, Discrete Inputs, Input Registers, and Holding Registers and the data that should be associated with each one.
If anyone could provide a simple explanation on this, that would be helpful.
Thanks,
criders
I am creating an embedded device that works using Mod Bus. Everything is progressing rather smoothly. I just finished the Mod Bus function (0x01) Read Coils. I was about to start on the next one, but it seems that it is the same as the first one. I am trying to match up data to the Mod Bus commands, but all the documentation is not very clear on the subject.
The device will have:
Digital Inputs - DIN (x8)
Digital Outputs - DOUT (x8)
Analog Inputs - AIN (x8)
Analog Outputs - AOUT (x8)
Various data for setting things up like baud rate,parity, process variables, etc. that the user can change.
Various data like the firmware number that the user can read but cannot change.
By my estimates, I think that this is the right approach to take:
DIN : (0x02) Read Discrete Inputs
DOUT : (0x01) Read Coils
AIN : (0x04) Read Input Registers
AOUT : (0x03) Read Holding Registers
Process variables : (0x03) Read Holding Registers
Firmware number : (0x04) Read Input Registers
I guess I am not clear on Coils, Discrete Inputs, Input Registers, and Holding Registers and the data that should be associated with each one.
If anyone could provide a simple explanation on this, that would be helpful.
Thanks,
criders