0
0
SCADA systemsdevops~10 mins

OPC (OLE for Process Control) in SCADA systems - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an OPC server connection.

SCADA systems
opc_server = OPCClient('[1]')
Drag options to blanks, or click blank then click option'
A192.168.1.100
BOPCServer1
Clocalhost
DOPC_DA
Attempts:
3 left
💡 Hint
Common Mistakes
Using IP address instead of server name
Using generic terms like 'localhost'
2fill in blank
medium

Complete the code to read a tag value from the OPC server.

SCADA systems
value = opc_server.read('[1]')
Drag options to blanks, or click blank then click option'
AOPCServer1
B192.168.1.100
CTag1
Dconnect
Attempts:
3 left
💡 Hint
Common Mistakes
Using server name or IP instead of tag name
Using method names instead of tag names
3fill in blank
hard

Fix the error in the code to write a value to an OPC tag.

SCADA systems
opc_server.write('[1]', 100)
Drag options to blanks, or click blank then click option'
ATag1
Bconnect
Cwrite
D100
Attempts:
3 left
💡 Hint
Common Mistakes
Using numeric values or method names as tag names
4fill in blank
hard

Fill both blanks to create a subscription and set the update rate.

SCADA systems
subscription = opc_server.create_subscription('[1]')
subscription.update_rate = [2]
Drag options to blanks, or click blank then click option'
A1000
BTag1
C500
DTag2
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping tag name and update rate
Using tag names as update rate
5fill in blank
hard

Fill all three blanks to read multiple tags and store their values in a dictionary.

SCADA systems
tags = ['[1]', '[2]']
values = {tag: opc_server.read(tag) for tag in tags if tag [3] 'Tag1'}
Drag options to blanks, or click blank then click option'
ATag1
BTag2
C!=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' instead of '!=' in filter
Wrong tag names in list