Hello Guest it is March 29, 2024, 07:41:22 AM

Author Topic: start from line #  (Read 13993 times)

0 Members and 1 Guest are viewing this topic.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: start from line #
« Reply #10 on: June 02, 2010, 04:21:06 AM »
manmardam - apart from anything else, you appear to be ignoring the fact that the macropump runs CONTINUALLY every 10th of a second. i.e. every 100ms.

Never mind the rest of your code, add up the time just for your delays (1300ms). What do you reckon that means?

EDIT: After re-reading up on the macropump I think I'm wrong here. According to Art's video, the macropump re-runs 1/10th of a second after it finishes the previous run - not every 1/10th of a second. Actually he say's a 1/5th of a second but I think that's changed.
« Last Edit: June 13, 2010, 05:06:07 AM by stirling »
Re: start from line #
« Reply #11 on: June 02, 2010, 04:27:40 AM »
As far as I know ,1300 ms is for my macro(M115) ,not macropump.
is it important that there is macropump what code to run?
« Last Edit: June 02, 2010, 04:30:22 AM by manmardam »
**Even a clock that does not work is right twice a day**

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: start from line #
« Reply #12 on: June 02, 2010, 04:33:43 AM »
As far as I know ,1300 ms is for my macro(M115) ,not macropump.
What is calling your M115?
Re: start from line #
« Reply #13 on: June 02, 2010, 04:35:19 AM »
yes, i call m115 with macropump.
I think you mean is:
Process inside macropump with the code located in(M115) ,should not be more than 100 ms
SO What is the solution?
« Last Edit: June 02, 2010, 04:38:34 AM by manmardam »
**Even a clock that does not work is right twice a day**

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: start from line #
« Reply #14 on: June 02, 2010, 05:18:06 AM »
yes, i call m115 with macropump.
I think you mean is:
Process inside macropump with the code located in(M115) ,should not be more than 100 ms
Well personally I'd make sure that any macropump finished WELL inside 100ms to be safe, but you get the idea. Remeber this is just one issue, there are others.

EDIT: See my edit above in post #10

SO What is the solution?
Don't use the macropump for this - it's not appropriate. If I understand your requirement, all you want to do is be able to run from the line where the latest M3 was and you want to be able to do that from an external button - correct?

Off the top of my head.

1) Modify M3 to record it's line number in a dro.
2) Add a screen button FOR THE OPERATOR that runs from that line. Mach has the facillity for "run from here" all taken care of, preparatory moves - the whole shabang - use that functionality.
3) To operate from the external button - use a trigger.

« Last Edit: June 13, 2010, 05:07:40 AM by stirling »
Re: start from line #
« Reply #15 on: June 02, 2010, 05:26:50 AM »
Quote
you want to do is be able to run from the line where the latest M3 was and you want to be able to do that from an external button - correct?
exactly.
i not problem with my macro, it work well.
but my problem is External button.when code dont run and axis is Immobile,i can trigger macro with external button. but when i press "Cycle start" and code run ,Does not do anything right. i dont trigger macro with external button.
I hope you understand my problem
please see my screen
Amir
« Last Edit: June 02, 2010, 05:35:06 AM by manmardam »
**Even a clock that does not work is right twice a day**

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: start from line #
« Reply #16 on: June 02, 2010, 05:38:47 AM »
I don't think you understand what I mean by trigger. You're attempting to create your own via the macropump by polling. There is no need to do this. Mach provides purpose built triggers for things like this. Read up on them in the manual.

Cheers

Ian
Re: start from line #
« Reply #17 on: June 02, 2010, 05:46:44 AM »
is it possible guide me more ?
**Even a clock that does not work is right twice a day**

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: start from line #
« Reply #18 on: June 02, 2010, 06:20:59 AM »
LOL - You're having me on right? I've given you what I think may be a possible approach. I'm not going to code it all up for you - it's your baby not mine.

Cheers

Ian

EDIT: By all means come back with specific questions but at the moment I can't think what else to say to help.
« Last Edit: June 02, 2010, 07:15:55 AM by stirling »
Re: start from line #
« Reply #19 on: June 02, 2010, 11:09:34 AM »
why nobody can not help me ?
This problem is so big?
**Even a clock that does not work is right twice a day**