Hello, i have some issue on retrieve Coils.
Im trying to retrieve coils from a xlogic PLC http://xlogic-plc.com/
For the connection I use TCP.
After I send the request i receive the answer but the value register is always 00
Below the HEX Request and Response Message of my code
Request getHexMessage 00 00 00 00 00 06 01 01 00 00 00 07
Response getHexMessage 00 00 00 00 00 04 01 01 01 00
If i use the following program (qmodmaster on sourceforge) to retrieve the same plc info every thing is working fine.
The send request is the same like my code( change only the TransactionID) but the Response
is different, in this case i have a value that reflect the coils status.
Hello, i have some issue on retrieve Coils.
Im trying to retrieve coils from a xlogic PLC http://xlogic-plc.com/
For the connection I use TCP.
After I send the request i receive the answer but the value register is always 00
Below the HEX Request and Response Message of my code
Request getHexMessage 00 00 00 00 00 06 01 01 00 00 00 07
Response getHexMessage 00 00 00 00 00 04 01 01 01 00
If i use the following program (qmodmaster on sourceforge) to retrieve the same plc info every thing is working fine.
The send request is the same like my code( change only the TransactionID) but the Response
is different, in this case i have a value that reflect the coils status.
Request 00 01 00 00 00 06 01 01 00 00 00 07
Response 00 01 00 00 00 04 01 01 01 05
And for this was wondering what im doing wrong?
I will apriciate your suggestion.
Thanks
marco
Below the code that i use to retrieve coils
-------------- BELOW my DEBUG RESULTS --------------
--GET COIL --
Request getHexMessage 00 00 00 00 00 06 01 01 00 00 00 07
getBitCount 8
getDataLength 4
getFunctionCode 1
Response getHexMessage 00 00 00 00 00 04 01 01 01 00
getMessage [B@2a0b20
getOutputLength 10
getProtocolID 0
getTransactionID 0
getUnitID 1
getCoils 00000000
getCoilStatus false
Digital COIL Status=00000000
Input Discrete bit 0=false
Input Discrete bit 1=false
Input Discrete bit 2=false
Input Discrete bit 3=false
Input Discrete bit 4=false
Input Discrete bit 5=false
Input Discrete bit 6=false
Input Discrete bit 7=false