Glad to see Thomas in on this, he is much better at VB than I will ever be
There is info on the CS-Lab site about using the I/O with the inbuild modbus and for that matter using as I/O in Mach as you would do with the PP.
As you have discovered you can not enable the I/O in Ports and Pins then use the Modbus or you will get conflicts, it is one or the other.
Here is very simple example of using some of the Inputs (from buttons) that I have in my macropump.
Ref= GetInbit(100,6)
Clamp=GetInBit(100,10)
If Ref=1 Then
DoOEMButton(1024)
While IsMoving()
Wend
DoOEMButton(1023)
While IsMoving()
Wend
DoOEMButton(1022)
While IsMoving()
Wend
End If
If Clamp=1 Then
SetModOutput(0,1)
Else
SetModOutput(0,0)
End If
BTW did you manage to see if that is a prox on the tool changer? If so did you see where it goes?
Hood