I used your code to create my own example of reading an input and writing an output via python and writing something to the logbook of the ctrlX CORE.
If you need further support feel free to write me a direct message with your contact data so we can have a virtual meeting.
Thee also see this post for information about the print function into the logbook of the ctrlX CORE.
#from ctrlxpy import datalayer
import functools
print = functools.partial(print, flush=True) # flush all prints
Channel1 = datalayer.read("fieldbuses/ethercat/master/instances/ethercatmaster/realtime_data/input/data/S20_EC_BK/S20_DI_16_4/Digital_Input_Channels.DI_Channel_01_Terminal_Point_00_")
log = str(Channel1)
print("read: ")
print(log)
Channel1 = datalayer.write("fieldbuses/ethercat/master/instances/ethercatmaster/realtime_data/output/data/S20_EC_BK/S20_DO_16_3/Digital_Output_Channels.DO_Channel_01_Terminal_Point_00_",Channel1)
print("write: ")
print(log)
ctrlX CORE logbook entry from python
... View more