14
« on: April 21, 2011, 08:08:36 AM »
I read the Brains Users Guide, this is some good doc.
The PK is used with the TCP Modbus as it should. I made a simple brain, using the first 3 pins on it with some switches wired and it is working. These were configured as inputs 0-2, as it is 0-based, so far so good.
Now I have trouble getting data from the analog inputs. I wired a POT to pin 43 which is at address 12 on the registers. I did test it on the modbus testing page and it is working, giving a DEC values from 0 to 4091. I watched the video for macropumps but it was intended for the ModIO card, so "getinput (64)" returns the value of the analog input 1, wired at pin 2 of the device. I found this on the ModIO manual, but did not quite understand, is this 64 value some sort of register or what?
The question now is what I enter after "getinput" to get data from the analog inputs of PK? I could not find info on this VB command.
I have made 2 configurations on the TCP Modbus dialog box. Config0 is 10 registers starting from 0 as discrete inputs, and Config1 is 7 registers starting from 10 as input registers. The second config is for the analog inputs.
This is another thing I doubt about. Since the PK manual says 0-54 addresses are discrete inputs, but 10-16 are analog inputs, do I have to make 2 configurations - one starting at 0 with 55 registers and the other at 10 with 7 registers?
Or I have to make 3 configs, the one 0-9 registers, the other 10-16 for the analog inputs and a third for the rest of the discrete inputs - 17-54?
The more I get into this, the more questions get generated here but gradually I am making some progress.
Thanks for the info