RobotStudio event

Premature reset of Digital output

rakshithb174
edited December 2019 in Robot Controller
Hello,

I am observing that my digital output is being reset earlier than it is supposed to. In the code below, the signal DO1_1 is supposed to be reset at the end of a particular move. But it loks like the signal is reset before the move is complete. 


VAR speeddata rtspeed := [150,500,5000,1000];
IntroSkirt;
Reset DO1_1;
WaitTime 0.5;
       
! Move to starting point of first square
MoveL [[112.500,40.000,1.000],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], rtspeed, z1, tool1\WObj:=BedOrigin;
MoveL [[112.500,40.000,0.250],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], rtspeed, z1, tool1\WObj:=BedOrigin;
! Begin
SetDO DO1_1,1;
! Complete first square
MoveL [[112.500,200.000,0.250],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v30,z1,tool1,\WObj:=BedOrigin;
MoveL [[12.500,200.000,0.250],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v30,z1,tool1,\WObj:=BedOrigin;
MoveL [[12.500,40.000,0.250],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v30,z1,tool1,\WObj:=BedOrigin;
MoveL [[112.500,40.000,0.250],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v30,z1,tool1,\WObj:=BedOrigin;
! Rtr
Reset DO1_1;
WaitTime 0.5;
       
! Move Up
MoveL [[115.00,40.000,1.000],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],rtspeed,z1,tool1,\WObj:=BedOrigin;
! Move to starting point of second square
MoveL [[237.500,40.000,1.000],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v100,z1,tool1,\WObj:=BedOrigin;
MoveL [[237.500,40.000,0.250],[0.00000000,0.00000000,1.00000000,0.00000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v100,z1,tool1,\WObj:=BedOrigin;


I have used signal analyzer online to check this. It looks like the digital output signal is being reset earlier by about 1s.


Does anybody know what is causing this and how to correct this?



Comments

  • z1. 
    Here's applicable information about one of the components of zone data:

    finep
    fine point
    Data type: bool
    Defines whether the movement is to terminate as a stop point (fine point) or as
    a fly-by point.
    • TRUE: The movement terminates as a stop point, and the program execution
    will not continue until robot reach the stop point. The remaining components
    in the zone data are not used.
    • FALSE: The movement terminates as a fly-by point, and the program
    execution continues about 100 ms before the robot reaches the zone.




    You may wish to consider constructing your own zone data, or if possible use TriggIO instructions.
  • @SomeTekk thanks for the tip! 

    I replaced z1 with fine and Reset worked as expected. But the fine zonedata is a stop-point and robot tends to stop for few milli-seconds before moving. I also tried z0, the predefined zone data with smallest zone radius. But it still doesn't work as expected. 

    Is there a way to define a stop-point like fine but reduce/define the wait time? I understand that robot slows down completely and waits until exact location is reached when fine or any stop point is used.
  • Used TriggIO to accurately controlled the timing of Digital output. Works well now 
  • Well done!