73
« on: December 19, 2010, 01:09:10 PM »
I'm having a time getting my head wrapped around this. I'm working with a DL05 and have a program running on the PLC. It responds as it should to switch X inputs and triggers Y outputs. Just to get something up and running quickly, to communicate with mach, I energize a Y output which puts 5V on a mach PP pin. Mach sees this and does it's thing. The PLC also has 4 analog inputs for doing various things. One comes from my plasma voltage divider so that one has to be a analog input, but the other three are just for setting parameters. These parameters could be set on a mach screen and written to the PLC V memory via modbus. My analog input is binary, so when I write a value (a number between 0 and 50) in needs to be in binary.
I guess my issue is that I'm lost when it comes to modbus addressing. All I know for sure through trial and error with the modbus monitor is that 1024 - 1028 are my 4 analog inputs. I can see X inputs at 2048 but only if I select "Discrete Inputs" and specify 8 inputs in the monitor. I can see all 8 switch no problem. If I select "Input Registers" I see nothing, just zeros.
What I would like to do is pick a V memory range on the PLC and use that for bit input/output. For instance, use V2200 for X inputs and V2201 for Y outputs. X0 = V2200.0, X1 = V2200.1......X7 = V2200.7. Same thing for V2201. So my PLC program wanted to notify mach of an event, it, for instance, would set V2201 bit 0. Mach would then need to see this....and this is where I'm running in circles.
I've gone through the PLC manual but it's pretty vague when it comes to modbus addressing, and the examples they give don't seem to make sense. Could someone please give me a rundown on how the modbus maps to V memory locations on the PLC?
Thanks