Maximilian-K - 2019-10-08


I am attempting to use a python script to add a CANbus device, CANopen Manager, and various CANopen slaves to a project.

My script keeps failing when trying to add the slave device. It tells me that "No device found with the following device identification". I have tried creating a device object as well as manually entering the type, id, and version, directly from the device details.

I have attached my code and screenshots showing the device details and the error I am receiving. Any help would be appreciated.


found = proj.find('Device', False)
assert(found is not None and len(found) == 1, 'No object with the name Device found')
assert(found[0].is_device, 'Found object is not a device')
device = found[0]
\# Add CANbus device using the type, ID and version instead of a DeviceID
device.add('CANbus', 15, '181015', '')
can1 = device.find('CANbus', False)[0]
can1.add("CANopen_Manager", 16, id="181016", version='')
can1_mgr = can1.find("CANopen_Manager", False)[0]
aoutId = device_repository.create_device_identification(18, '55_AA030521', '')
aout_dev = device_repository.get_device(aoutId)
can1_mgr.add('1AOUT', aoutId)
\# can1_mgr.add(name='1AOUT',type=18, id='55_AA030521', version='')

IMG: 2019

IMG: 2019