Hi,
I am trying to automate the process of generating a project from scratch with python. currently I am stuck at generating devices with proper I/Os, assigned to them.
like this:
Here is my code so far:
#CREATE DEVICE proj = projects.primary DeviceMain = proj.find('Device', recursive = True)[0] #proj.add('CANbus',4096)#,"0000 0002","3.5.14.0") try: DeviceMain.add("CANbus",15,"181015","3.5.12.0") except: print('Device "CANbus" already exsist') DeviceCANbus = DeviceMain.find('CANbus', recursive = True)[0] try: DeviceCANbus.add("CAN_Local_Device_HMI4",17,"0000 0011","3.5.1.0") except: print('Device "CAN_Local_Device_HMI4" already exsist') DeviceLocal = DeviceCANbus.find("CAN_Local_Device_HMI4", recursive = True)[0]
The code should continue to add and map the inputs and outputs to Device "CAN_Local_Device_HMI4".
Can some one help me?
Regards Jaka
Log in to post a comment.
Hi,
I am trying to automate the process of generating a project from scratch with python. currently I am stuck at generating devices with proper I/Os, assigned to them.
like this:

Here is my code so far:
The code should continue to add and map the inputs and outputs to Device "CAN_Local_Device_HMI4".
Can some one help me?
Regards
Jaka