EDrive - Communication
There are different communication protocols which transfer telegrams between devices.
The ComBase class aims to bundle common parts of the protocol classes.
ComBase
The ComBase class defines interface functions used to handle I/O data and for capable device also PNU accesses.
start_io: Starts the I/O data operation
stop_io: Stops the I/O data operation
send_io: Writes provided bytes data to the process data outputs
recv_io: Reads from process data inputs and returns bytes data
For cases where PNU access is available there are also methods
read_pnu: Reads a PNU of provided index and subindex and interprets with provided datatype
write_pnu: Writes a provided PNU value to provided index and subindex as provided datatype
ComEthernetip
Instantiating a ComEthernetip requires an IP address.
Optionally the cycle time can be provided (default is 10 ms).
Be aware that most likely your OS will be a limiting factor here.
edrive = ComEthernetip('192.168.0.1', cycle_time=50)
ComModbus
Instantiating a ComModbus requires an IP address.
Optionally the modbus timeout which should be configured on the endpoint can be provided (default is 1000 ms).
edrive = ComModbus('192.168.0.1', timeout_ms=500)
EDrive - MotionHandler
The MotionHandler class can be used to start different motion tasks.
Under the hood it uses PROFIDRIVE telegram 111.
The intention of the class is to provide an abstraction from telegram 111 to the user, thus providing a simpler interface.
The motion class is instantiated by providing a edrive communication instance that is used to transfer the telegram (e.g. ComEthernetip or ComModbus).
with MotionHandler(edrive) as mot:
The instance is then able of handling basic setup sequences.
mot.acknowledge_faults()
mot.enable_powerstage()
And start motion tasks:
mot.position_task(position=1000, velocity=5000)