I just finished a rough set up on our robots and i was wondering if there was a way to make it run bullseye at certain times of the day
How to make a timer for bullseye to run at certain times of the day
-
tjohnsonfrazier -
September 24, 2021 at 8:23 PM -
Thread is Unresolved
-
-
Is it being controlled by a PLC?
-
No it is not
-
Here is a little snippet for running something if it is the next day or more days:
IF stDate<>CDate() THEN
rWakey_Wakey;
stDate:=CDate();
ENDIF
I am looking for another example.
-
Here is another:
Code
Display MoreIF stDate<>CDate() THEN MotionSup\On\TuneValue:=125; ELSE MotionSup\On\TuneValue:=100; ENDIF TPErase; stTime:=CTime(); stHour:=StrPart(stTime,1,2); stMinute:=StrPart(stTime,4,2); bOk := StrToVal(stHour,nTimeCurrentHour); bOk := StrToVal(stMinute, nTimeCurrentMin); IF nTimeCurrentHour <> nTimeLastHour OR (nTimeCurrentMin > nTimeLastMin +10) THEN MotionSup\On\TuneValue:=125; ELSE MotionSup\On\TuneValue:=100; ENDIF
The thing that you need to keep in mind is do not try to set a specific time unless you know that the robot will be available to run it or else you will rarely ever do bullseye. Set a time window when it can do it, between welding jobs.
-
thanks i will give that a try im wanting it to do it first thing in the morning before shift as we only run them on day shift
-
So im still fairly new at this programming, could you give me an example of it running a bullseye check at 6:00 am
-
Use the most recent code I posted and change the last part:
IF (nTimeCurrentHour = 6) AND (nTimeCurrentMin = 0) THEN
Bullseye;
ENDIF
-
thanks
-
IF (nTimeCurrentHour = 6) AND (nTimeCurrentMin = 0) THEN
BEQkChk;;
ENDIF
Honestly, run mine the beginning of every cycle... better safe then sorry
-
I would run every cycle but my cycle times are only 1 minute on one and 3 mins on the other
-
well that wouldnt be very efficient. lol
You could always create a counter. 30-50 cycles = bulleye
I guess it all depends how often you bend up the gooseneck.