10-26-2021, 11:28 PM
Using: RoboDK v5.2.5 (64 bit), Windows 10, UR5 (in this example)/UR5e/UR10 robots, Python.
I've included a video in this post as an aid to explain my confusions. My primary focus is making use of a Digital Input (3) on the UR5. It is just a switch that I am manually pressing and letting go of. It seems like the Python script is just ignoring the Digital Input state. At first I thought it just wasn't coming through, but I used ShowMessage() function to produce some feedback on that Bool and it is registering.
Side confusion: why is it that the function ShowMessage() ignores my "False" input for the popup argument? It just goes ahead and shows me the pop up regardless.
In a different test, I found that in a conditional IF statement, using getDI() doesn't work as I thought it would. Basically, it will ignore whether or not the input is active/on/true/1 and allow any code that's under the "not true"/(!= 1)... regardless of the actual getDI() value, whether its 1 or 0. What is the proper way to make use of and implement getDI()?
RoboDK_DigitalInput.mp4(Size: 1.07 MB / Downloads: 216)
I've included a video in this post as an aid to explain my confusions. My primary focus is making use of a Digital Input (3) on the UR5. It is just a switch that I am manually pressing and letting go of. It seems like the Python script is just ignoring the Digital Input state. At first I thought it just wasn't coming through, but I used ShowMessage() function to produce some feedback on that Bool and it is registering.
Side confusion: why is it that the function ShowMessage() ignores my "False" input for the popup argument? It just goes ahead and shows me the pop up regardless.
In a different test, I found that in a conditional IF statement, using getDI() doesn't work as I thought it would. Basically, it will ignore whether or not the input is active/on/true/1 and allow any code that's under the "not true"/(!= 1)... regardless of the actual getDI() value, whether its 1 or 0. What is the proper way to make use of and implement getDI()?
RoboDK_DigitalInput.mp4(Size: 1.07 MB / Downloads: 216)