i am using an adapter i never try before and my code using libnodave didn't writ anymore. To initialise it i had to cgange daveproto from MPI2 to MPI. But bow the init is ok but i still can't read and write value from the PLC (S7300)
here is what i obtain with the command testmpi -d -s COM2 :
setPort COM2
setPort 38400
setPort O
IF1 enter initAdapter(1).
I send:
0:0x02,
readSingle 1 chars. 1st 10
IF1 initAdapter() step 1.
I send:
0:0x01,0x0D,0x02,0x10,0x03,0x1D,
_daveSendWithCRC:
0:0x01,0x0D,0x02,0x10,0x03,0x1D,
readSingle 1 chars. 1st 10
IF1 initAdapter() step 2.
readSingle 1 chars. 1st 02
IF1 initAdapter() step 3.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 4c. I calc: 4c
answer:
0:0x01,0x0D,0x20,0x56,0x30,0x30,0x2E,0x38,0x33,0x10,0x03,0x4C,
I send:
0:0x10,
I send:
0:0x02,
readSingle 1 chars. 1st 10
IF1 initAdapter() step 4.
I send:
0:0x01,0x03,0x02,0x27,0x00,0x9F,0x01,0x3C,0x00,0x90,0x01,0x14,0x00,0x00,0x05,0x02,
10:0x00,0x1F,0x02,0x01,0x01,0x03,0x80,0x10,0x03,0x8A,
_daveSendWithCRC:
0:0x01,0x03,0x02,0x27,0x00,0x9F,0x01,0x3C,0x00,0x90,0x01,0x14,0x00,0x00,0x05,0x02,
10:0x00,0x1F,0x02,0x01,0x01,0x03,0x80,0x10,0x03,0x8A,
readSingle 1 chars. 1st 10
IF1 initAdapter() step 5.
readSingle 1 chars. 1st 02
IF1 initAdapter() step 6.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 42. I calc: 42
answer:
0:0x01,0x03,0x20,0x56,0x30,0x30,0x2E,0x38,0x33,0x10,0x03,0x42,
I send:
0:0x10,
IF1 initAdapter() success.
I send:
0:0x02,
readSingle 1 chars. 1st 10
IF1 listReachablePartners() step 1.
I send:
0:0x01,0x07,0x02,0x10,0x03,0x17,
_daveSendWithCRC:
0:0x01,0x07,0x02,0x10,0x03,0x17,
readSingle 1 chars. 1st 10
IF1 listReachablePartners() step 2.
readSingle 1 chars. 1st 02
IF1 listReachablePartners() step 3.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 2a. I calc: 2a
answer:
0:0x01,0x07,0x20,0x00,0x00,0x1F,0x30,0x10,0x30,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
10:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
20:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
30:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
40:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
50:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
60:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
70:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
80:0x10,0x10,0x10,0x10,0x10,0x10,0x03,0x2A,
I send:
0:0x10,
daveListReachablePartners List length: 126
Device at address:0
Device at address:2
ConnectPLC
I send:
0:0x02,
readSingle 1 chars. 1st 10
IF1 connectPLC(1) step 1.
I send:
0:0x04,0x82,0x80,0x0D,0x00,0x14,0xE0,0x04,0x00,0x80,0x00,0x02,0x00,0x02,0x01,0x00,
10:0x01,0x00,0x10,0x03,0x68,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0D,0x00,0x14,0xE0,0x04,0x00,0x80,0x00,0x02,0x00,0x02,0x01,0x00,
10:0x01,0x00,0x10,0x03,0x68,
readSingle 1 chars. 1st 10
IF1 connectPLC(1) step 2.
readSingle 1 chars. 1st 02
IF1 connectPLC(1) step 3.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 4b. I calc: 4b
answer:
0:0x04,0x82,0x80,0x0C,0x14,0x12,0xD0,0x04,0x00,0x80,0x00,0x02,0x00,0x02,0x01,0x00,
10:0x01,0x00,0x10,0x03,0x4B,
I send:
0:0x10,
I send:
0:0x02,
IF1 daveConnectPLC(1) step 4.
readSingle 1 chars. 1st 10
IF1 daveConnectPLC() step 5.
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0x05,0x01,0x10,0x03,0x1B,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0x05,0x01,0x10,0x03,0x1B,
readSingle 1 chars. 1st 10
readSingle 1 chars. 1st 02
IF1 daveConnectPLC() step 6.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 1b. I calc: 1b
answer:
0:0x04,0x82,0x80,0x0C,0x14,0x12,0x05,0x01,0x10,0x03,0x1B,
I send:
0:0x10,
I send:
0:0x02,
IF1 daveConnectPLC() step 6.
PDU header:
0:0x32,0x01,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,
plen: 8 dlen: 0
Parameter:
0:0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,
_daveExchange PDU number: 65535
IF1 enter _daveSendMessageMPI
I send:
0:0x02,
readSingle 1 chars. 1st 10
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x00,0x32,0x01,0x00,0x00,0xFF,0xFF,0x00,0x08,
10:0x00,0x00,0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,0x10,0x03,0xE6,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x00,0x32,0x01,0x00,0x00,0xFF,0xFF,0x00,0x08,
10:0x00,0x00,0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,0x10,0x03,0xE6,
readSingle 1 chars. 1st 15
IF1 *** no DLE after send(1) 15.
readSingle 0 chars. 1st 00
IF1 *** no DLE after send(2) 00.
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x00,0x32,0x01,0x00,0x00,0xFF,0xFF,0x00,0x08,
10:0x00,0x00,0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,0x10,0x03,0xE6,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x00,0x32,0x01,0x00,0x00,0xFF,0xFF,0x00,0x08,
10:0x00,0x00,0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,0x10,0x03,0xE6,
readSingle 1 chars. 1st 15
IF1 *** no DLE after resend(3) 15.
I send:
0:0x02,
readSingle 1 chars. 1st 15
IF1 *** no DLE before resend.
IF1 *** _daveSendMessageMPI error in _daveSendDialog.
IF1 _daveSendMessageMPI send done. needAck 0
readSingle 1 chars. 1st 15
IF1 *** _daveSendMessageMPI no STX after _daveSendDialog.
readSingle 1 chars. 1st 15
IF1 *** _daveSendMessageMPI no STX after _daveSendDialog.
readSingle 1 chars. 1st 15
IF1 *** _daveGetResponseMPI no STX before answer data.
readSingle 1 chars. 1st 15
I send:
0:0x10,
IF1 _daveGetResponseMPI receive message.
IF1 *** _daveGetResponseMPI no answer data.
result of exchange: -3
PDU header:
0:0x32,0x01,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,
plen: 14 dlen: 0
Parameter:
0:0x04,0x01,0x12,0x0A,0x10,0x02,0x00,0x10,0x00,0x00,0x83,0x00,0x00,0x00,
_daveExchange PDU number: 65536
IF1 enter _daveSendMessageMPI
I send:
0:0x02,
readSingle 1 chars. 1st 10
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x01,0x32,0x01,0x00,0x00,0x00,0x00,0x00,0x0E,
10:0x00,0x00,0x04,0x01,0x12,0x0A,0x10,0x10,0x02,0x00,0x10,0x10,0x00,0x00,0x83,0x00,
20:0x00,0x00,0x10,0x03,0x4E,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x01,0x32,0x01,0x00,0x00,0x00,0x00,0x00,0x0E,
10:0x00,0x00,0x04,0x01,0x12,0x0A,0x10,0x10,0x02,0x00,0x10,0x10,0x00,0x00,0x83,0x00,
20:0x00,0x00,0x10,0x03,0x4E,
readSingle 1 chars. 1st 10
IF1 _daveSendMessageMPI send done. needAck 1
readSingle 1 chars. 1st 02
I send:
0:0x10,
IF1 enter getAck ack
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 9f. I calc: 9f
answer:
0:0x04,0x82,0x80,0x0C,0x14,0x12,0x80,0x10,0x03,0x9F,
IF1 *** getAck wrong length 10 for ack. Waiting for 1
dump:wrong ack::
0:0x04,0x82,0x80,0x0C,0x14,0x12,0x80,0x10,0x03,0x9F,
I send:
0:0x10,
readSingle 0 chars. 1st 00
IF1 *** _daveGetResponseMPI no STX before answer data.
readSingle 0 chars. 1st 00
I send:
0:0x10,
IF1 _daveGetResponseMPI receive message.
IF1 *** _daveGetResponseMPI no answer data.
result of exchange: -3
error -3=no message defined!
_daveExchange PDU number: 65537
IF1 enter _daveSendMessageMPI
I send:
0:0x02,
readSingle 1 chars. 1st 10
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x02,0x32,0x01,0x00,0x00,0x00,0x01,0x00,0x10,
10:0x10,0x00,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x09,0x50,0x5F,0x50,0x52,0x4F,0x47,
20:0x52,0x41,0x4D,0x10,0x03,0xA5,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x02,0x32,0x01,0x00,0x00,0x00,0x01,0x00,0x10,
10:0x10,0x00,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x09,0x50,0x5F,0x50,0x52,0x4F,0x47,
20:0x52,0x41,0x4D,0x10,0x03,0xA5,
readSingle 1 chars. 1st 10
IF1 _daveSendMessageMPI send done. needAck 2
readSingle 0 chars. 1st 00
IF1 *** _daveSendMessageMPI no STX after _daveSendDialog.
readSingle 0 chars. 1st 00
IF1 *** _daveSendMessageMPI no STX after _daveSendDialog.
readSingle 0 chars. 1st 00
IF1 *** _daveGetResponseMPI no STX before answer data.
readSingle 0 chars. 1st 00
I send:
0:0x10,
IF1 _daveGetResponseMPI receive message.
IF1 *** _daveGetResponseMPI no answer data.
result of exchange: -3
Now disconnecting
I send:
0:0x02,
readMPI single DLE.
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0x80,0x10,0x03,0x9F,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0x80,0x10,0x03,0x9F,
readMPI single DLE.
I send:
0:0x10,
IF1 enter DisconnectAdapter()
I send:
0:0x02,
readMPI single DLE.
I send:
0:0x01,0x04,0x02,0x10,0x03,0x14,
_daveSendWithCRC:
0:0x01,0x04,0x02,0x10,0x03,0x14,
IF1 daveDisconnectAdapter() step 1.
readMPI single DLE.
readMPI single STX.
IF1 daveDisconnectAdapter() step 2.
I send:
0:0x10,
I send:
0:0x10,
got:
0:0x01,0x04,0x20,0x10,0x03,0x36,0x02,0x80,0x15,0x02,
If it tells something to somebody it will be cool ;-)
the result of exchange : -3 is what i get under VB6 .
Thanks
Olivier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
i am using an adapter i never try before and my code using libnodave didn't writ anymore. To initialise it i had to cgange daveproto from MPI2 to MPI. But bow the init is ok but i still can't read and write value from the PLC (S7300)
here is what i obtain with the command testmpi -d -s COM2 :
setPort COM2
setPort 38400
setPort O
IF1 enter initAdapter(1).
I send:
0:0x02,
readSingle 1 chars. 1st 10
IF1 initAdapter() step 1.
I send:
0:0x01,0x0D,0x02,0x10,0x03,0x1D,
_daveSendWithCRC:
0:0x01,0x0D,0x02,0x10,0x03,0x1D,
readSingle 1 chars. 1st 10
IF1 initAdapter() step 2.
readSingle 1 chars. 1st 02
IF1 initAdapter() step 3.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 4c. I calc: 4c
answer:
0:0x01,0x0D,0x20,0x56,0x30,0x30,0x2E,0x38,0x33,0x10,0x03,0x4C,
I send:
0:0x10,
I send:
0:0x02,
readSingle 1 chars. 1st 10
IF1 initAdapter() step 4.
I send:
0:0x01,0x03,0x02,0x27,0x00,0x9F,0x01,0x3C,0x00,0x90,0x01,0x14,0x00,0x00,0x05,0x02,
10:0x00,0x1F,0x02,0x01,0x01,0x03,0x80,0x10,0x03,0x8A,
_daveSendWithCRC:
0:0x01,0x03,0x02,0x27,0x00,0x9F,0x01,0x3C,0x00,0x90,0x01,0x14,0x00,0x00,0x05,0x02,
10:0x00,0x1F,0x02,0x01,0x01,0x03,0x80,0x10,0x03,0x8A,
readSingle 1 chars. 1st 10
IF1 initAdapter() step 5.
readSingle 1 chars. 1st 02
IF1 initAdapter() step 6.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 42. I calc: 42
answer:
0:0x01,0x03,0x20,0x56,0x30,0x30,0x2E,0x38,0x33,0x10,0x03,0x42,
I send:
0:0x10,
IF1 initAdapter() success.
I send:
0:0x02,
readSingle 1 chars. 1st 10
IF1 listReachablePartners() step 1.
I send:
0:0x01,0x07,0x02,0x10,0x03,0x17,
_daveSendWithCRC:
0:0x01,0x07,0x02,0x10,0x03,0x17,
readSingle 1 chars. 1st 10
IF1 listReachablePartners() step 2.
readSingle 1 chars. 1st 02
IF1 listReachablePartners() step 3.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 2a. I calc: 2a
answer:
0:0x01,0x07,0x20,0x00,0x00,0x1F,0x30,0x10,0x30,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
10:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
20:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
30:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
40:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
50:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
60:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
70:0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
80:0x10,0x10,0x10,0x10,0x10,0x10,0x03,0x2A,
I send:
0:0x10,
daveListReachablePartners List length: 126
Device at address:0
Device at address:2
ConnectPLC
I send:
0:0x02,
readSingle 1 chars. 1st 10
IF1 connectPLC(1) step 1.
I send:
0:0x04,0x82,0x80,0x0D,0x00,0x14,0xE0,0x04,0x00,0x80,0x00,0x02,0x00,0x02,0x01,0x00,
10:0x01,0x00,0x10,0x03,0x68,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0D,0x00,0x14,0xE0,0x04,0x00,0x80,0x00,0x02,0x00,0x02,0x01,0x00,
10:0x01,0x00,0x10,0x03,0x68,
readSingle 1 chars. 1st 10
IF1 connectPLC(1) step 2.
readSingle 1 chars. 1st 02
IF1 connectPLC(1) step 3.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 4b. I calc: 4b
answer:
0:0x04,0x82,0x80,0x0C,0x14,0x12,0xD0,0x04,0x00,0x80,0x00,0x02,0x00,0x02,0x01,0x00,
10:0x01,0x00,0x10,0x03,0x4B,
I send:
0:0x10,
I send:
0:0x02,
IF1 daveConnectPLC(1) step 4.
readSingle 1 chars. 1st 10
IF1 daveConnectPLC() step 5.
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0x05,0x01,0x10,0x03,0x1B,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0x05,0x01,0x10,0x03,0x1B,
readSingle 1 chars. 1st 10
readSingle 1 chars. 1st 02
IF1 daveConnectPLC() step 6.
I send:
0:0x10,
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 1b. I calc: 1b
answer:
0:0x04,0x82,0x80,0x0C,0x14,0x12,0x05,0x01,0x10,0x03,0x1B,
I send:
0:0x10,
I send:
0:0x02,
IF1 daveConnectPLC() step 6.
PDU header:
0:0x32,0x01,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,
plen: 8 dlen: 0
Parameter:
0:0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,
_daveExchange PDU number: 65535
IF1 enter _daveSendMessageMPI
I send:
0:0x02,
readSingle 1 chars. 1st 10
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x00,0x32,0x01,0x00,0x00,0xFF,0xFF,0x00,0x08,
10:0x00,0x00,0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,0x10,0x03,0xE6,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x00,0x32,0x01,0x00,0x00,0xFF,0xFF,0x00,0x08,
10:0x00,0x00,0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,0x10,0x03,0xE6,
readSingle 1 chars. 1st 15
IF1 *** no DLE after send(1) 15.
readSingle 0 chars. 1st 00
IF1 *** no DLE after send(2) 00.
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x00,0x32,0x01,0x00,0x00,0xFF,0xFF,0x00,0x08,
10:0x00,0x00,0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,0x10,0x03,0xE6,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x00,0x32,0x01,0x00,0x00,0xFF,0xFF,0x00,0x08,
10:0x00,0x00,0xF0,0x00,0x00,0x01,0x00,0x01,0x03,0xC0,0x10,0x03,0xE6,
readSingle 1 chars. 1st 15
IF1 *** no DLE after resend(3) 15.
I send:
0:0x02,
readSingle 1 chars. 1st 15
IF1 *** no DLE before resend.
IF1 *** _daveSendMessageMPI error in _daveSendDialog.
IF1 _daveSendMessageMPI send done. needAck 0
readSingle 1 chars. 1st 15
IF1 *** _daveSendMessageMPI no STX after _daveSendDialog.
readSingle 1 chars. 1st 15
IF1 *** _daveSendMessageMPI no STX after _daveSendDialog.
readSingle 1 chars. 1st 15
IF1 *** _daveGetResponseMPI no STX before answer data.
readSingle 1 chars. 1st 15
I send:
0:0x10,
IF1 _daveGetResponseMPI receive message.
IF1 *** _daveGetResponseMPI no answer data.
result of exchange: -3
PDU header:
0:0x32,0x01,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,
plen: 14 dlen: 0
Parameter:
0:0x04,0x01,0x12,0x0A,0x10,0x02,0x00,0x10,0x00,0x00,0x83,0x00,0x00,0x00,
_daveExchange PDU number: 65536
IF1 enter _daveSendMessageMPI
I send:
0:0x02,
readSingle 1 chars. 1st 10
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x01,0x32,0x01,0x00,0x00,0x00,0x00,0x00,0x0E,
10:0x00,0x00,0x04,0x01,0x12,0x0A,0x10,0x10,0x02,0x00,0x10,0x10,0x00,0x00,0x83,0x00,
20:0x00,0x00,0x10,0x03,0x4E,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x01,0x32,0x01,0x00,0x00,0x00,0x00,0x00,0x0E,
10:0x00,0x00,0x04,0x01,0x12,0x0A,0x10,0x10,0x02,0x00,0x10,0x10,0x00,0x00,0x83,0x00,
20:0x00,0x00,0x10,0x03,0x4E,
readSingle 1 chars. 1st 10
IF1 _daveSendMessageMPI send done. needAck 1
readSingle 1 chars. 1st 02
I send:
0:0x10,
IF1 enter getAck ack
readMPI: DLE ETX,packet end.
readMPI: packet end, got BCC: 9f. I calc: 9f
answer:
0:0x04,0x82,0x80,0x0C,0x14,0x12,0x80,0x10,0x03,0x9F,
IF1 *** getAck wrong length 10 for ack. Waiting for 1
dump:wrong ack::
0:0x04,0x82,0x80,0x0C,0x14,0x12,0x80,0x10,0x03,0x9F,
I send:
0:0x10,
readSingle 0 chars. 1st 00
IF1 *** _daveGetResponseMPI no STX before answer data.
readSingle 0 chars. 1st 00
I send:
0:0x10,
IF1 _daveGetResponseMPI receive message.
IF1 *** _daveGetResponseMPI no answer data.
result of exchange: -3
error -3=no message defined!
_daveExchange PDU number: 65537
IF1 enter _daveSendMessageMPI
I send:
0:0x02,
readSingle 1 chars. 1st 10
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x02,0x32,0x01,0x00,0x00,0x00,0x01,0x00,0x10,
10:0x10,0x00,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x09,0x50,0x5F,0x50,0x52,0x4F,0x47,
20:0x52,0x41,0x4D,0x10,0x03,0xA5,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0xF1,0x02,0x32,0x01,0x00,0x00,0x00,0x01,0x00,0x10,
10:0x10,0x00,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x09,0x50,0x5F,0x50,0x52,0x4F,0x47,
20:0x52,0x41,0x4D,0x10,0x03,0xA5,
readSingle 1 chars. 1st 10
IF1 _daveSendMessageMPI send done. needAck 2
readSingle 0 chars. 1st 00
IF1 *** _daveSendMessageMPI no STX after _daveSendDialog.
readSingle 0 chars. 1st 00
IF1 *** _daveSendMessageMPI no STX after _daveSendDialog.
readSingle 0 chars. 1st 00
IF1 *** _daveGetResponseMPI no STX before answer data.
readSingle 0 chars. 1st 00
I send:
0:0x10,
IF1 _daveGetResponseMPI receive message.
IF1 *** _daveGetResponseMPI no answer data.
result of exchange: -3
Now disconnecting
I send:
0:0x02,
readMPI single DLE.
I send:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0x80,0x10,0x03,0x9F,
_daveSendWithCRC:
0:0x04,0x82,0x80,0x0C,0x12,0x14,0x80,0x10,0x03,0x9F,
readMPI single DLE.
I send:
0:0x10,
IF1 enter DisconnectAdapter()
I send:
0:0x02,
readMPI single DLE.
I send:
0:0x01,0x04,0x02,0x10,0x03,0x14,
_daveSendWithCRC:
0:0x01,0x04,0x02,0x10,0x03,0x14,
IF1 daveDisconnectAdapter() step 1.
readMPI single DLE.
readMPI single STX.
IF1 daveDisconnectAdapter() step 2.
I send:
0:0x10,
I send:
0:0x10,
got:
0:0x01,0x04,0x20,0x10,0x03,0x36,0x02,0x80,0x15,0x02,
If it tells something to somebody it will be cool ;-)
the result of exchange : -3 is what i get under VB6 .
Thanks
Olivier