The return value must be 0.Ħ - Page user always. This event allows you to define a single function that is called when all pages are closed. The return value must be 0.ĥ - Page user close. This event allows you to define a single function that is called when all pages are opened.
If the return value is not zero, it does not update the page.Ĥ - Page user open. If the return value is 0 (zero), Citect SCADA still animates the page. A communication error has been detected in the data required for this page. If the return value is not 0, Citect SCADA assumes that you will process the error, and continues the Cicode without generating a hardware error.ģ - Page user communication error. If the return value is 0, Citect SCADA continues to process the error and generates a hardware error - it may then halt the Cicode task. This event is called if an error is detected in Cicode, so you can write a single error function to check for your errors. If you are using a right mouse button click as an event, you should read about the ButtonOnlyLeftClick parameter.Ģ - Error event. It is up to you to remove the key from the key command line. If the return value is not 0, Citect SCADA assumes that you will process the key and does not check the key sequence. If the return value is 0, Citect SCADA checks for key sequences. When the user presses a key, the callback function is called after Citect SCADA checks for hot keys. The return value must be 0.ġ - A key has been pressed. When the mouse moves the callback function is called.
The "Shutdown Confirmation" event is raised in the following cases:.The new task can call the appropriate function to process the event, such as the Shutdown() function for a Shutdown Confirmation event. For confirmation events, the event callback function should return a non-zero value to tell Citect SCADA not to continue processing the event. Since the event callback function cannot block, any blocking function calls or long loops should be moved to a separate function.The callback function can start with the TaskNew() command.If the event handler is non-interactive with instant return value, it can be called directly.If the return value is not 0, Citect SCADA assumes that you will process the event and discard the message internally. If the return value is 0, the event will be processed by Citect SCADA in default mode which is the original behavior. When the user clicks any button of the Windows tile bar, or size/move the window, or shutting down a process, the callback function is called. For event type 42.49, a windows system event is received.Set the Fn argument to 0 (zero) to disable the event. The return value of the callback will depend on the type of the event. Any I/O device variable that you use will contain either 0 (zero) or bad quality. They also need to be non-blocking.Ĭitect SCADA starts running the function immediately, without reading any data from the I/O devices. Callback functions have no arguments and needs to return an integer. Using callback functions removes the need for polling or checking for events. The callback function is called when the event occurs. Sets an event callback function for an event type.
Save, Download and Close Hardware Configuration.Cicode Programming Reference > Cicode Function Categories > Event Functions > OnEvent Set Pg/Pc interface on TCP/IP and check that plcSim is using TCP/IP too: In my project this is the configuration of ethernet card:
Now the PC that is running Step 7 and PLCSim is the PLC, this means that PC and ethernet card must have the same IP Address and if you are communicating with another PC you have to set also the router address. Let’s create a new project, add a s7 300-2DP (standard configuration) and an ethernet card CP-343-1. With NetToPLCSim you are able to connect your SCADA/HMI-systems via S7-communication to PLCSim over TCP/IP, and read/write data areas from your simulated PLC.Ģ- Ethernet cable plugged in (some peoples says this is needed)ģ- Port 102 Opened (so exception in your firewall and shutdown s7oiehsx service (command line from start -> run : net stop s7oiehsx)
This is a tutorial on how to connecto to NetToPlcSim. The official site to download the program is here: