Page Tree
Other Releases
...
Code Block |
---|
Connect(runtimeHostAddress, userName, password): runtimeHostAddress = IP address or server name userName = User name. password = Password |
Code Block |
---|
GetConnectionStatus () |
...
Code Block |
---|
Disconnect() |
Code Block |
---|
SetSyncFlag(flag): flag = True wait value from server, false does not wait value from server. |
Code Block |
---|
GetObjectValue(name) name = TagName |
Code Block |
---|
SetObjectValue(name, newValue) name = TagName newValue = new value to set in the tag. |
...
In this first example, there are two input parameters called val1 and val2 that will be summarized and the result will be stored in the result variable.
...
In this scenario, we configure a task for the Python language. In the Python file name field, you need to set the Python file that will be to be executed. In this example, we used the Main2.py.
...
In the Standard Output field, we selected a tag called output. This tag type must be text. In the Arguments field, we selected another type of tag called script.
The Using the print method, the Python file called Main2.py gets the retrieves the input data and outputs its value inside a string, using the print method. Where the . The sys.argv will receive the Tag.script and the output tag will receive all the values from the print() method.
Code Block |
---|
import sys value = sys.argv[1] print("Value: " + value) print("That’s all folks!") |
...