Example: Configuration of SMI devices
Requirements
Target system with TwinCAT Project Files |
With the example it is possible to address SMI devices or to expand an existing installation. Moreover the dialogues for diagnosis and error analysis can be used. A total of 5 dialogues are available.
Start

Under SMI_Start is the main menu, via which the five submenus can be accessed.
Control

On pressing the StartScanning button, a search is made for addressed SMI devices on the SMI line. All SMI devices found are displayed in the list on the left by the manufacturer code and the slave ID. An entry is selected by clicking it. The other buttons are always related to the selected entry. This allows all important SMI commands to be sent to every addressed SMI device. If an error is detected with an SMI command, this is indicated in the bottom right-hand corner by the error code.
Addressing

Each SMI device can be assigned an address from 0 to 15. Each SMI device can be addressed via this address. Although there are other methods of addressing SMI devices (see here), a unique address is necessary for group addressing. Therefore it is advisable to assign an address to each SMI device. The Start Scanning button is used to search for all addressed SMI devices. If an address is to be changed, then the corresponding SMI device must be selected in the list. The desired address can be entered in the input box on the right next to the Change Address button and accepted by actuating the button.
If SMI devices do not have an address yet, all SMI devices are assigned an address by pressing the Start Addressing button. The user has no influence over which address is assigned to which SMI device. The addresses are assigned in descending order, starting with the address specified by the HighestAddress parameter. The Current Manufacturer Id, Current Address and Current Search Slave-Id fields provide information about the status of the addressing. The addressing can be prematurely cancelled by pressing Cancel Addressing.
Library Status

Communication between the individual PLC blocks and the Bus Terminal takes place within the PLC library via three central buffers (for each SMI terminal). The extent of utilisation of the buffers and possible overflows can be determined from the illustrated table.
Terminal Status

The status information from the process image of the terminal is displayed in this dialogue. In addition, messages requiring acknowledgement can be reset in this dialogue.
Configurate Terminal

SMI commands can be sent via two digital inputs of the SMI terminal. This dialog can be used to specify which SMI commands are triggered in the event of a rising or falling edge. An SMI command can also be sent, if communication has ceased on the K-bus of the terminal (e.g. the PLC is stopped, or the connection to the fieldbus master is interrupted).