Action Details tab settings

<< Click to Display Table of Contents >>

Manual > Server Creation Guide > Actions > Common settings for actions >

Action Details tab settings

overview

Each action has an Advanced tab.

 

In the detailed settings, you can configure the following:

 

Script execution for each action

Adjusting the action processing timing

 

(Details tab of the action)

c_action_0339

 

 

Script execution for each action

You can execute a script in SC1 syntax for each action.

 

c_action_0340

 

The script can be executed before processing begins, after processing ends, when processing is successful, or when processing fails.

For example, if you want to perform calculations between tags as preprocessing before executing an action, and then execute the action's processing based on the tag value resulting from the calculation, use "Before starting processing."

 

 

■How to set up

 

If you check the timing for executing the process, the settings button "..." will be enabled.

 

c_action_0341

 

 

Clicking the Settings button will display the script editor.

Scripts are written in this editor screen.

 

Below is an example of a script.

 

c_action_0344

 

 

Furthermore, by clicking the "Advanced" button in the script editor, you can configure how tags are processed when referenced from a script.

 

c_action_0343

 

Here's how to get the tag value:

 

How to get the tag value

explanation

Use a cached value.

The tag value is retrieved from the cache. When a cached value is used, the cached value updated by periodic communication is used for the calculation. Since a cached value is used, the calculation is performed immediately.

 

Use cached value. Read real value only the first time.

When retrieving a tag value, the latest value is read from the real value (PLC device value) only the first time it is executed, and the cached value is used from the second time onwards (default).

 

Even if periodic communication has not been performed even once immediately after going online, the real value is read the first time, so it is not possible for the value to be unavailable. Since the cached value is used other than the first time, subsequent calculations are performed immediately.

 

Get the real value for each expression.

This option obtains real values (PLC device values) for each formula. Therefore, the processing speed is the slowest, but since values are obtained from the PLC for each formula and the calculation results are written to the PLC, synchronization with the PLC values can be reliably maintained. Specify this option only if, for some reason, it is necessary to perform calculations based on the latest values each time a calculation is performed.

 

Get all the real values required for the entire formula together.

The values of all tags written in the script are retrieved from the real values (PLC device values) at once and used as the initial values for the calculation.

 

 

 

Furthermore, the default number of retries when tag communication fails is three.

 

 

hint

The script written in the "Advanced Settings" tab is an SC1 syntax script. For details on the SC1 syntax, see "Script Ver1 (SC1 syntax)".

 

hint

You can also execute the SC1 script using the Script Ver1 action. For more information about the Script Ver1 action, see "Script Ver1".

 

 

 

Adjusting action processing timing

The Advanced tab allows you to configure the timing of action processing.

 

c_action_0345

 

These can be set when multiple actions are registered to one event and you want to adjust the execution timing of each action.

 

setting

explanation

Before processing begins

You can specify the time in seconds to wait before executing the action.

 

After the process is complete

You can specify the amount of time in seconds to wait after the action is executed.