Hey Wolfman,
The Pokeys writes to the Old style "Non-Plugin Serial Modbus" (the original one), internally it writes to a structure.
Analog 1, 2, 3, and 4 of PoKeys writes to the NP SMB addresses of: 124, 125, 126, 127 respectively, Even though the pokeys can take and configure
an Analog 5, it will crash Mach3 if you try to add it, (been there, done that, tried starting the range at 123-127 still dont understand why it crashes.. but it does.).
From VB, you can access the serial mb (only the above old school one), or you can acess the NP SMB via brains modbus address 124-127.
here is some of the Modbus VB access code:
GetInBit(BuffIndex, BitNumber)
to use this one, Index number is 0-63 on channel one, and 64-127 on Channel 2, and BitNumber is 0-15 relating to the individual bit status in that word that you want, i.e. 0 or 1. See the Input section of config autopoller modbus. NOTE If you are using Bit packing special control then you can only Use the GetInBit on the 2cd channel 64-127. You have to use something like "IsActive(INPUT1)" on channel 1. If you don't use bit packing then you can use it with the 1st channel.
SetOutBit(BuffIndex, BitNumber)
to use this one, Index number is 0-63 on channel one, and 64-127 on Channel 2. and BitNumber is 0-15 relating to the individual bit status in that word that you want, It Turns the bit ON!!. See the Output section of config autopoller modbus. NOTE If you are using Bit packing special control then you can only Use the SetOutBit on the 2cd channel 64-127. You have to use something like "ActivateSignal(OUTPUT1)" on channel 1. If you don't use bit packing then you can use it with the 1st channel.
ReSetOutBit(BuffIndex, BitNumber)
is just like SetOutBit(BuffIndex, BitNumber) above, but it turns the requested bit OFF.
GetMasterInput(0-127) 'gets the word at that address
GetMasterOutput(0-127) 'gets the word at that address
SetMasterOutput(0-127, 0-15bit) 'sets the word at that address
SetMasterInput(0-127, 0-15bit) 'sets the word at that address (note this only works if there is nothing writting in from outside, otherwise it that info
will be overwritten the next scan.
Scott