How do you use ProTool to synchronize the data and time between a SIMATIC HMI panel and a SIMOTION controller?
Proceed as follows.
Create a SIMOTION project
Create/import a structured program in SIMOTION Scout
|3||Create global tags and program|
Global tags are required for data exchange between ProTool and the SIMOTION Scout. The system time can be read or set with the aid of the ReadClock and SetClock functions which are created.
ReadClock( FALSE, TRUE, DT#2005-01-01-0:0:0 );
Accept and compile
|4||Define the program call in the execution system|
The program which is created in or imported into SIMOTION Scout also has to be defined as a background task in the execution system.
You can then compile your SIMOTION configuration and transfer it to the SIMOTION device.
|5||Create a SIMOTION connection in ProTool|
The connection with the SIMOTION device must be defined in ProTool.
In the project tree you double-click "Controllers" to create a new connection and select the "SIMOTION V6.0" protocol. Click the "Parameters..." button (2) in the selection window.
In the "SIMOTION" dialog that opens, under "Connect OP to network" you select the PROFIBUS subnet (3) to which the panel is connected as hardware. Then you select the SIMOTION device under "Choose a communication peer/symbol list" (4).
|6||Add tags for time synchronization|
In the project tree, under "Tags" you create all the tags required:
|7||Create a script |
The system time of the panel can be changed via the (CMD) console with the Windows "Date" and "Time" operating system functions. The Windows console is called via the script functions "Call" and "Start_PtFct.Program".
Description of the "Start_program" function:
PtFct.Programm_starten (<ProgName>, <Param>, <Layout>, <Wait>)
Create a further script
The "Now" function delivers the current system date and time for the panel or PC.
|9||Create screens and objects|
Create two buttons, two date-time fields, as well as (optionally) an alarm view with system messages as an alarm event in a new screen.
The alarm view is merely used as a configuration aid. Among other things, the system message, which must be explicitly configured, appears in this display to indicate whether the SIMOTION device is connected to the panel.
Then connect the upper date/time field to the "Uhr.time_plc" tag which you created previously. Select "Display system time" in the lower date/time field.
|11|| Link the script to the buttons
You can now transfer the configuration to the panel or start the PC runtime.
Download the structured SIMOTION program
This file contains the "Uhr.st" file which can be imported into SIMOTION Scout V3.2.1.
Uhr.zip (1 KB)
Download the sample project
The packed file contains the SIMOTION ProTool project which is described in the instructions. The ProTool project requires ProTool version V6.0 SP3.
Simotion_ProTool.zip (450.8 KB)
Runnability and test environment
The following table lists the components that have been used to create this entry and verify the functions described.
|Components||Product and version designation|
|PC operating system||Microsoft Windows XP SP2|
|Engineering Tools||SIMOTION Scout V 3.2.1|
|HMI Software||ProTool V6.0 SP3|
Date synchronization, Time synchronization