Hello,
I have faced an awkward situation in which universal outputs that are set with DOUT instruction to ON state, automatically reverts to OFF state after few seconds... What is interesting, such a situation occurs in remote mode only, if I set the same OT in TEACH or PLAY mode everything works as it should... I have spotted, that this problem affect at least two different OTs.
Hardware configuration is following - controller DX200, group R1, S1.
Because I needed independent control of R1 and S1 group (no synchro, S1 is rotating working table from first to second position only), I have created two main jobs, one for R1 group and second for S1. Each of them contain infinite loop in which robot or positioner waits for orders from PLC. Data exchange between both jobs and PLC is done using standard inputs output, from area not interfering with specific io's. Both main jobs are being started using PSTART instruction.
Please find below attached program fragments:
MasterJob
NOP
DOUT OT#(TableAllocated) OFF
DOUT OT#(RobotInStation) OFF
DOUT OT#(AppStarted) OFF
DOUT OT#(AppFinished) OFF
DOUT OT#(RobotReadyStart) OFF
PSTART JOB:MAIN_S1 SUB1
PSTART JOB:MAIN_R1 SUB2
END
MainS1
NOP
WHILE B000=B000 /// any better ideas for infinite loop on Yaskawa?
WAIT OT#(TableAllocated)=OFF
IF IN#(RequestTablePos1)=ON AND IN#(3873)=OFF AND IN#(3874)=ON THEN
CALL JOB:ROT_TABLE_R1O2
ENDIF
IF IN#(RequestTablePos2)=ON AND IN#(3874)=OFF AND IN#(3873)=ON THEN
CALL JOB:ROT_TABLE_R2O1
ENDIF
IF IN#(3873)=ON OR IN#(3874)=ON THEN
DOUT OT#(TableRdyToWork) ON
ENDIF
ENDWHILE
END
Display More
MainR1
NOP
'Init
DOUT OT#(AppStarted) OFF //reseting on init
DOUT OT#(TableAllocated) OFF //reseting on init
DOUT OT#(AppFinished) OFF //reseting on init
DOUT OT#(RobotInStation) OFF //reseting on init
DOUT OT#(RobotReadyStart) OFF //reseting on init
'
CALL JOB:CHECK_HOMEPOS
'
WHILE B000=B000
TIMER T=0.10
DOUT OT#(AppStarted) OFF //reseting in loop after finishing program
DOUT OT#(RobotInStation) OFF //reseting in loop after finishing program
DOUT OT#(TableAllocated) OFF //reseting in loop after finishing program
DOUT OT#(RobotReadyStart) ON //info to PLC that robot is ready for PGNO receiving
WAIT IN#(StartSeqFromPLC)=ON //release from PLC to start Switch instruction and jump in selected job
DOUT OT#(RobotReadyStart) OFF //setting start readiness to 0
DOUT OT#(AppFinished) OFF
SWITCH I100 CASE 0
CASE 10
CASE 20
CASE 40
DOUT OT#(AppStarted) ON
WAIT B000<>0
CALL JOB:0040_Program040 UF#(B000)
DOUT OT#(AppFinished) ON
CASE 320
DOUT OT#(AppStarted) ON
WAIT B000<>0
CALL JOB:0320_Program320 UF#(B000)
DOUT OT#(AppFinished) ON
ENDSWITCH
ENDWHILE
'
END
Display More
Please look at snippet from above:
DOUT OT#(RobotReadyStart) ON //at this line, robot should set RobotReadyStart OT to 1 and wait until line below (StartSeqFromPLC) is fullfilled
WAIT IN#(StartSeqFromPLC)=ON
DOUT OT#(RobotReadyStart) OFF
But after few (maybe 10 maybe 20 seconds), for unknown reason RobotReadyStart OT is switching to OFF state I double or even triple - checked this issue, and every time it works the same (transition from 1 to 0 is observed both on PLC and at IN / OUT card on Yaskawa's teachpendant...
I have no idea what is going wrong here, moreover I cannot find mistake in my code..
Later I have found out, that the same situation is with another output.
Is there maybe sth like maximum ON-state time for DOUT function? It would be stupid while we have PULSE instruction, but maybe?
Could this PSTART instruction be messing around? I expect that those PSTARTs execute only once, and start two parallel tasks with infinite loops inside.
Guys, please help me