The Modbus Extension only supports a limited number of write functions. However it does encode and decode the Modbus protocol.
The response you get is jacked up, but I do so a kinda valid response in a different pane that is 0D 04 01 02 44 (response to a FC4 to read only 0001) which would tell me the value of the 30002 register is 0x0244 or 580 in decimal.This extension is from the hardware standpoint identical to the RS485 extension, because Modbus is just an RS485 bus anyway.
That should return 10 bytes and look like 0D 04 0A # ? where # is the data and ? is the check sum. ĮDIT2: I actually looked at your image and your first command 0D 04 0001 0005 6105 is to read 5 input registers from node 16, starting at register 0001 (the second register, 30002) with CRC of 6105 which is just a check sum thing.
It's just part of generic serial comms setup.ĮDIT: If you can see the modbus frames, they are dirt simple to interpret manually. The databits thing is about serial, not Modbus RTU, which it the protocol sitting on top of serial and has nothing to do with registers or their number of bits.
If you are getting only the lower or upper 8 bits, then the issue is not with Modbus or the function code you are using, but probably the datatype receiving the data being 8 bit. Modbus registers are always 16bit and there is no way to not read the entire 16 bits. PS: Asked in r/findareddit where I should ask this question and was led here. I've also tried to adjust how I receive the data so it's divided between 8 bits, but that doesn't seem to give anything useful either. I've considered whether the fact I use 8 data bits is the cause (can't have more in the simulation software) but if that was the case I'd assume that I wouldn't be able to write a value larger than 255 either, which is not the case.
I know that there's likely an overflow (going from 8 bits to higher) but I don't know how to fix it. Now, looking at the datasheet for the actuator I can see the register I'm reading from is S16 (which I assume means Signed 16 Int value). However, when I try to read any position over 255 the value I get is 64 (and sonetimes 32). I have no problem writing any value to the actuator and moving it to that postion.
I've been using the Simply Modbus Master 8.1.2 software to do this test, but have run into a problem with reading values.īasically, I'm adjusting the position of the actuator by writing a position to it (1/10mm), and then I'm reading where it currently is (1/10mm). I've been doing some tests using modbus to control an actuator as part of a larger project. Please click "report" on spam Related sub-reddits: (*) At mods' discretion, certain self-promotion submissions from people who contribute to this sub in other ways may be allowed and tagged with the "Self-promo" flair
PLC internship, employment and education questions.Homework help but make it clear it's homework.This sub is dedicated to discussion and questions about Programmable Logic Controllers (PLCs): "an industrial digital computer that has been ruggedized and adapted for the control of manufacturing processes, such as assembly lines, robotic devices, or any activity that requires high reliability, ease of programming, and process fault diagnosis." On topic subjects