ScriptDriverInfo

class ScriptDriverInfo.AlwaysUpdateVariablesMode(value)

Bases: Enum

Defines always mapping modes on a parameter or connectors.

Disabled = 1

Disable the always update of the variables.

OnlyIfUnused = 2

The io channel is mapped in the bus cycle task if no other task is using it. If it used in an task then alwaysmapping is ignored, because it is updated in the used task only.

AlwaysInBusCycle = 3

The io channel is always updated in the bus cycle task independent of the real task usage. Therefore task consistency is not guaranteed.

class ScriptDriverInfo.ScriptDriverInfo

Bases: object

Provides access to the driver info of the device.

Mostly the visible parts of the tab “PLC Settings” in the device editor.

property can_set_io_application

Whether the IO application can be set.

Return type:

bool

property io_application

Get/set the object Guid of the application which does the IO handling.

Return type:

Guid

set_io_application(application)

Set the application which does the IO handling.

Parameters:

application (ScriptApplication) – Script object of the application.

property update_ios_while_in_stop

Update IOs while in stop.

Return type:

bool

property behaviour_for_outputs_on_stop

Get/set the behaviour for outputs on stop.

Return type:

StopResetBehaviour

property user_program_for_stop_reset_behaviour

Get/set the behaviour program for stop/reset if behaviour_for_outputs_on_stop is set to ExecuteProgram.

See also: StopResetBehaviour.ExecuteProgram

Return type:

str

property always_update_variables

Set the mode for (always) updating variables.

Return type:

AlwaysUpdateVariablesMode

property bus_cycle_task_by_name

Get the name of the bus cycle task.

Return type:

str

property bus_cycle_task_by_guid

Get the object guid of the bus cycle task.

Return type:

Guid

set_bus_cycle_task(task: ScriptObject)

Set the bus cycle task by name or object guid or script object.

Parameters:

task (ScriptObject) – Script Object of the task.

property generate_force_variables

Generate force variables for IO mapping.

Return type:

bool

property enable_diagnosis

Enable diagnosis for devices.

Return type:

bool

property show_io_warnings_as_errors

Show IO warnings as errors.

Return type:

bool