Created
May 15, 2020 21:17
-
-
Save clope031/b60cb9a237e5314b698f06281d1e0025 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
import win32com.client | |
# Create CAO engine handler (start CAO.exe) | |
eng = win32com.client.Dispatch("CAO.CaoEngine") | |
# Creating a CAO controller handler | |
ctrl = eng.Workspaces(0).AddController("RC8", "CaoProv.DENSO.RC8", "", "Server=192.168.0.1") | |
# Creating a Variable object (Global Variable Integer I11) | |
I11 = ctrl.AddVariable("I11", "") | |
# Read Value and print | |
print I11.Value | |
# Write new value by adding one to current value | |
I11.Value = I11.Value + 1 | |
# Read Value and print | |
print I11.Value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment