User Manual

GETTING STARTED


OTHER EDITIONS


LAUNCHERS


MODULES


PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support

ALL USER MANUAL VERSIONS

Ignition 8.1. Offline Version (04/2021)
Ignition 8 Online Version
Ignition 7.9 Online Version
Ignition 7.8 Online Version

Deprecated Pages

SDK Documentation

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

Sets the connection mode for the Client. Normally a Client runs in mode 3, which is read-write. You may wish to change this to mode 2, which is read-only, which will only allow reading and subscribing to Tags, and running SELECT queries. Tag writes and INSERT / UPDATE / DELETE queries will not function. You can also set the connection mode to mode 1, which is disconnected, all Tag and query features will not work.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.setConnectionMode(mode)

  • Parameters

Integer mode - The new connection mode: 1 = Disconnected, 2 = Read-only, 3 = Read/Write.

  • Returns

Nothing

  • Scope

Vision Client

Code Examples
Code Snippet
# This example, which could go in a project's startup script, checks the current username 
# and sets the connection mode to read-only if it is the "guest" user.
 
username = system.security.getUsername()
if "guest" == username.lower():
   # Set "guest" user to read-only mode.
   system.util.setConnectionMode(2)
else:
   system.util.setConnectionMode(3)
Keywords

system util setConnectionMode, util.setConnectionMode