Author Topic: Main and Routins Problem  (Read 425 times)

0 Members and 1 Guest are viewing this topic.

Offline kntgzhn

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 12
Main and Routins Problem
« on: June 17, 2017, 09:09:58 PM »
Hello Everyone,

I have some problems with our robot and programming. I use offset function of robot. So, robot put the standart package.
I write 18 routines program ( up area 1, up area 2, up area 3..... and down area 1, down area 2, down area 3 .... until 18 number )

And then, ı created main program, called all programs. Program is working without problem. For example; ı want to start program from "up area 8 point"  BUT when program is working as automatically, pointer is going main ( starting point). Program is not going my line. In manuel mode, ı have not problem. Only automatic mode.

How to prevent this problem? Is there any advice or view)
« Last Edit: June 17, 2017, 09:26:44 PM by kntgzhn »

Offline jarm

  • Jr. Member
  • **
  • Thank You
  • -Given: 24
  • -Receive: 10
  • Posts: 64
Re: Main and Routins Problem
« Reply #1 on: June 17, 2017, 10:11:48 PM »
You need to start the program from the beginning in auto. Stop before you jump from all programs to your first routine. Move the program pointer to the routine you want to call next. Auto, motors on, play....done


Sent from my iPhone using Tapatalk

Offline jarm

  • Jr. Member
  • **
  • Thank You
  • -Given: 24
  • -Receive: 10
  • Posts: 64
Re: Main and Routins Problem
« Reply #2 on: June 17, 2017, 10:16:08 PM »
You can not start a program from the middle of it in auto. All programs start from the main in auto. You can move the program pointer after you start it though. In manual you can start from anywhere cause your in MANUAL


Sent from my iPhone using Tapatalk

Offline jarm

  • Jr. Member
  • **
  • Thank You
  • -Given: 24
  • -Receive: 10
  • Posts: 64
Re: Main and Routins Problem
« Reply #3 on: June 17, 2017, 10:22:59 PM »
And if you don't know how to move the program pointer (pp). In manual, in your program editor, open the debug menu, highlight the line you want to jump to, press pp to cursor in the debug menu. Little yellow arrow should move next to your line. Auto, motors on ( little white button) play... done


Sent from my iPhone using Tapatalk

Offline kntgzhn

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 12
Re: Main and Routins Problem
« Reply #4 on: June 18, 2017, 06:22:22 AM »
Yes that's problem. Why am I move program pointer in auto mode?
When I press auto button, robot move "pp to main".
In this situation, I can use easily but it is complex for our operators.

You can not start a program from the middle of it in auto. All programs start from the main in auto. You can move the program pointer after you start it though. In manual you can start from anywhere cause your in MANUAL


Sent from my iPhone using Tapatalk

Offline rizze

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 2
  • Posts: 22
Re: Main and Routins Problem
« Reply #5 on: June 18, 2017, 07:41:03 AM »
I think you should use a CallByVar  instruction.

Offline jarm

  • Jr. Member
  • **
  • Thank You
  • -Given: 24
  • -Receive: 10
  • Posts: 64
Re: Main and Routins Problem
« Reply #6 on: June 18, 2017, 12:58:29 PM »
Then you should write a new starting routine that lets you pick which routine you want to begin with. It's a little more complex but very doable. You are able to use if, then, else statements and user inputs. I'm sure you could build a starting routine that asks the operator where to begin.

I don't know how often you need to start with a different routine but if you place a stop cmd at the beginning of your first routine and show your operators how to move the program pointer then it should only take 5 secs to move it and restart.

 CallByVar will work as well but your operator needs to set the variable to the proper value.
 
Sent from my iPhone using Tapatalk
« Last Edit: June 18, 2017, 01:26:55 PM by jarm »

Offline Iowan

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 58
  • Posts: 477
Re: Main and Routins Problem
« Reply #7 on: June 19, 2017, 11:32:19 AM »
Most of my S4C+ robots (and all my IRC5's) restart in Auto from Main... though I have a couple that are set to start from whatever program they were last running. That's not usually what I want, but might be what you're looking for.  I'll have to re-discover the flag that selects "current" or "main".