Yes the pin number is as you say and port number is the port you have it set to, with Mach you can use two parallel ports so it will either be 1 or 2. With other devices there can be more ports, for example if you are using Modbus device such as a PLC it is Port 0, if you have a SmoothStepper you have Ports 1, 2 and 3. If you have a PoKeys that gets set to Port10.
Hood