I would like my python script to add an IO Module (8in/8out) to the k-bus. Here is my code:
PROJECT = r"C:\Projects\WAGO_Test.project"
proj = projects.create(PROJECT)
found = proj.find('CODESYS_Control_for_PFC200', False)
device = found
kbus = device.find('Pfc200Bus', True)
kbus.add('_750-1506', 288, '0000 0001', '188.8.131.52') # <-- ERROR HERE
This gives an error however:
'Exception was raised: The device cannot be added or inserted here'
What am I doing wrong?
What method do I use to add an IO device? (I have tried 'kbus.plug =' and that also did not work.)