EIO are not working as exepted in Python-Scripting


#1

Hello everyone,

We try to use the EIO 11,12,14,15 with extern switches at 3.3V

In our Python-Script we prepare all EIOs with:
dType.SetIOMultiplexing(api, 12, 3, 1)

in our loop while(True): we use
i=dType.GetIODI(api,11)[0]
p=dType.GetIODI(api,12)[0]

sometimes it works on both (i and p) to set 0 to 1, but most times it does not work.

Another problem is that we can not effect dType.SetPTPCmd(api,…) in real-time with these control-EIOs

I hope somebody can help to fix this problem…


#2

Hi, maybe you can use the EIO commands separately:

# Get port status
while True:
	a = dType.GetIODO(api, 11)
	b = dType.GetIODO(api, 12)
	c = dType.GetIODO(api, 13)
	d = dType.GetIODO(api, 14)

And to work simultaneous with the arm movement you could check threads subject on python, to excecute multiple task at the same time.