@terrypacker
NOW I understand! The offset is determined using predefined starting addresses by function from the MODBUS specification! Your explanation and that website you pointed me to was far more informative than watching a bunch of YouTube videos! Thank you so much for you help!
For those who find this thread later in life, here is what works (as of CLICK firmware 3.21):
public static void main( String[] args ) throws Exception { /* Define Connection */ IpParameters ipParameters = new IpParameters(); ipParameters.setHost( "10.3.17.132" ); ipParameters.setPort( 502 ); /* Make the connection */ ModbusMaster master = new ModbusFactory().createTcpMaster( ipParameters, false ); master.init(); /* Test connectivity */ System.out.println( "testSlaveNode 1: " + master.testSlaveNode( 1 ) ); /* Define the location points and type */ BaseLocator< Boolean > clickX001 = BaseLocator.inputStatus( 1, 0 ); // Click X001: input BIT on CPU BaseLocator< Boolean > clickY001 = BaseLocator.coilStatus( 1, 0 ); // Click Y001: output COIL on CPU BaseLocator< Boolean > clickY002 = BaseLocator.coilStatus( 1, 1 ); // Click Y002: output COIL on CPU BaseLocator< Number > clickDS1 = BaseLocator.holdingRegister( 1, 0, DataType.TWO_BYTE_INT_SIGNED ); // Click DS1: Data Register Single Word /* Set/Write a value to a point */ master.setValue( clickDS1, 1 ); /* Get/Read the current value of each point */ System.out.println( "clickX001 : " + master.getValue( clickX001 ) ); System.out.println( "clickY001 : " + master.getValue( clickY001 ) ); System.out.println( "clickY002 : " + master.getValue( clickY002 ) ); System.out.println( "clickDS1 : " + master.getValue( clickDS1 ) ); }PLC Program for testing:
cd1664f4-d91d-4013-a770-bac216fcba96-image.png