Maximilian-K - 2019-10-08

Hello,

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.

Thanks,
Max

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', '3.5.15.0')
can1 = device.find('CANbus', False)[0]
can1.add("CANopen_Manager", 16, id="181016", version='3.5.15.0')
can1_mgr = can1.find("CANopen_Manager", False)[0]
aoutId = device_repository.create_device_identification(18, '55_AA030521', '3.5.1.0')
print(aoutId)
aout_dev = device_repository.get_device(aoutId)
can1_mgr.add('1AOUT', aoutId)
\# can1_mgr.add(name='1AOUT',type=18, id='55_AA030521', version='3.5.1.0')

IMG: 2019

IMG: 2019