It is fairly simple. For the following code to work, map any PoKeys input to Mach3 IO Pin 0 and map one of the PoKeys outputs to Mach3 IO Pin 1.
Dim devName As String
devName = GetIODevName(0)
MsgBox(devName + " IO0: " + Str(GetIODevInput(0, 0)))
MsgBox(Str(SetIODevOutput(0, 1, 0)))