Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# 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=")
# 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
You can’t perform that action at this time.