For easy integration of this driver into the application it is handy to use: Preconfigurations in group "3964 and RK512 communication protocol"
The Slave message is that that waits at first for the data receipt from the MASTER and then it replies. It means that the MASTER specifies when the transfer occurs. Because it isn't possible to change dynamically the amount of transmitted (received) data in the PROMOTIC system objects, the object of the SLAVE type serves only for the receipt and transmission of the same type of data. It isn't possible to have, for example, two Slave messages (two PmaCommMsg objects) while the first one only receives the data and the other should send the data.
For the correct response to the Slave message it is mostly necessary to use the onDataReceive event that is triggered after the data receipt but before sending the response. You can find in this event (from variables on the "Data-received" page) how the response should be and accordingly to set the data on the "Data-sent" page.
|Baud rate||9600 Bd|
|Number of data bits||8|
|Number of stop bits||1|
|Timeout between receiving 2 chars||220 ms (ZVZ timeout according to the documentation)|
|High priority||Specifies whether the station has the higher priority than the opposite station. At the opposite station it is necessary to set the reverse priority. Setting this option correctly limits possible conflicts on the line.|
|With RK512 extension||Enable/disable automatically to generate message headers according to the RK512 extension. Pressing the "Data setting" button in the parameters of the communication message can generate the headers. A detailed description of the headers is stated further in the "Communication with RK512 extension" section.|
|Use checksum (3964R)||Specifies whether the protocol contains the checksum. If the checksum is enabled, then there is included the XOR checksum in the protocol. It goes about the common used protocol 3964R.|
|Data format||The Simatic device has stored bytes of the Integer data type in the reverse order and the Short data type type in different format of the real number than the PC standard. That's why the driver converts these values. |
If the PC option is selected, then the conversion isn't performed. It is necessary, for example, for the communication with the SCHENCK scale where the format is like on PC.
|Maximum message size [in bytes]||Specifies the maximum number of bytes in the message (received or transmitted) without check chars (i.e. max. data size that is configured on the Data-sent or Data-received pages).|
|Acknowledgement timeout after STX [ms]||Specifies the timeout between sending the STX signal and receiving the DLE signal. It is so-called QVZ timeout and default settings are 2000 or 550 ms (depends on the documentation).|
|Acknowledgement timeout after ETX [ms]||Specifies the timeout between sending and receiving the DLE signal. It should be the same as the "Acknowledgement timeout after STX" by default.|
|Response receipt timeout||The time (in milliseconds) the driver is waiting for the response on sending the message. If no response comes during this time, then the transfer of the message is terminated (the onEndOfTransfer event is triggered with error 24 or 66). It is timeout between receiving the DLE after sending the message and receiving the STX. It should be the same as the "Acknowledgement timeout after STX" by default.|
Because only the currently transferred data is defined on the data pages, depending only on the current application, the "Data setting" button is not available and the designer must fill in these data into the pages manualy.
Some devices transferring messages by the 3964 protocol send a message header before the "useful" data. The header has got the standard format. Further described headers can be created automatically by the "Data setting" button in the PmaCommMsg object. To allow an access to the "Data setting" button, the RK512 extension must be enabled in the protocol parameters. This extension distinguishes 2 types of standardized headers. The long header is transmitted by messages of the Master type; its receipt is expected by messages of the Slave type. On the other hand the short header is transmitted by messages of the Slave type as a response, its receipt is expected by messages of the Master type.
The message of the Master type that writes 3 words to the offsets DW4 to DW6 into the data block 61, i.e. DB61:
There are following variables on the "Data-sent" page:
There are following variables on the "Data-received" page:
The following description has only an informative character and the designer needn't know this information. It goes about the shorten description of how the physical transmission proceeds on the line. The knowledge can help for the INFO system viewing: "COMM/Pm3964" item, "Monitor" page.
Let's presume that we want to send data (n bytes) of the "without the header" transmission type (in case of the "with the header" transmission type the header would be considered as ordinary data). Then the transmission proceeds as follows:
The receipt of the DLE signal means the positive response in this case. If the NAK signal (15hex) comes, then it means the negative response and the transmission of the message is repeated. The receipt process of the message turns precisely inside out.
The most often defects on the first tests of the communication are in bad connection of communication cables. If the cable is OK but the communication still is not functional, then it is necessary to focus on the software settings, for example:
A lot of information can be get in the "COMM" item of the INFO system.