Parameters
When a master wants to establish a connection with a Profibus DP slave, it initially sends the parameter list. Parameters are constant values that the slave uses for internal setup.
Parameters consist of 7 mandatory parameter bytes followed by optionally 0 to 244 device specific parameter bytes. The PD 667 generates automatically the 7 mandatory Profibus parameters.
Parameters size and Parameters list is only concerning the device specific user parameters called “User_PRM_data”. If no device specific parameters is required size must be = 0.
Parameter values could be: Measure range of an analogue channel (e.g. 0-20mA or 0-10V), data format for data exchange (e.g. word or real format), module configuration of an I/O block etc.
Size: determines how many user parameter bytes from the list the master should send to the slave when initialising the connection. Size can be from 0 to 244.
List: parameter data for the slave.
Parameter data are extracted from the GSD file. Often, the first 3 user parameter bytes are set to 0, because they may be used for Profibus DP-V1.
Configuration
When a master wants to establish a connection with a Profibus DP slave, it initially sends the configuration list. Configuration list describes: number of, size of and characteristics of the data objects to be used in Data Exchange mode. Each byte in the configuration list describes one data object. Using a standard configuration byte structure, each object can contain 1 to 16 bytes or words, with or without consistency. As a special configuration (occupies 2 bytes + optional user specific data) 1 to 64 bytes or words, with or without consistency can be defined.
Size: determines how many bytes from the list the master must send to the slave when initialising the connection. Size can be from 1 to 100.
List: configuration data for the slave. Configuration data are extracted from the GSD file.
Structure of a standard configuration byte:
Structure of a special identifier byte: (None, or up to two length bytes plus optional vendor specific bytes, may follow a special identifier byte. If vendor specific data follows, there are no restraints on the content of these data.)
A length byte has the following structure:
OutputSize: Number of data bytes that must be transferred from the master to the slave, when in data exchange.
InputSize: Number of data bytes received by the master from the slave, when in data exchange.
InputSize and OutputSizes must always match the sum of input and output data specified by the configuration bytes.
The PD 667 master accepts configuration of 'input only' as well as 'output only' slaves.
Note: The slaves GSD file may specify a maximum of output bytes, maximum of input bytes, and maximum sum of input and output bytes. The configuration must never exceed these limits. GSD keywords: Max_Input_Len / Max_Output_Len / Max_Data_Len / |
Input
Input is the data sent from the slave to the master, when in data exchange. Input data is a stream of bytes without gaps. Only the number of bytes specified by InputSize is valid. The rest of the array contains arbitrary data.
When the slave is not in data exchange mode all input bytes are set to 0.
Output
Output is the data sent from the master to the slave, when in data exchange. Output data is a stream of bytes without gaps. The number of bytes specified by OutputSize is sent.
|
InfoInfo contains slave status information, error counters and other data that can be used to monitor the slave and provide assistance to troubleshoot a connection.
State
State contains the current position of the state machine for the slave.
During normal operation the state must be 4. If the state is 0, the slave is not detected on the network.
Status
Status contains 8 bits, each with a specific status indicator from the slave.
Bit 2 is set by the user to request the driver to fetch diagnosis data from the slave. The driver resets the bit when the command is performed.
Bit 3 and 4 may be reset by the user and will be set by the driver, next time new data is ready.
Bit 4 is only set true when the received data is different to the existing data in input.
Diagnostic
Size shows the number of bytes of diagnostic data received from the slave. The size includes the standard diagnostic part.
List contains all data received in the diagnostic telegram. Device specific data starts at index 8.
Diagnosis data layout:
ErrorCounters
FCerrors: counts the number of messages received with a bad checksum.
NoResponses: counts the number of times the slave has not responded to a request.
Inits: counts the number the connection to the device has been initialized.
All error counters are set to 0 when the driver is started.
FCB
FCB is a bit used to detect duplicated messages. For each new message to a slave the master inverts the FCB bit. If the slave receives two or more consecutive valid messages with the same FCB, they are supposed to be repeated. All repeated messages are disregarded.
DiagCount
The slave is allowed a number of network scan loops to process the parameters and the configuration telegrams. DiagCounts counts how many loops the device has used before it made a positive response to the Check_Config message. If a positive response is not received before the DiagCount reaches the maximum limit, the slave state is changed to 0.
|