Hello Guest it is March 28, 2024, 07:01:01 AM

Author Topic: Controlling Mach with Powerpoint? Is this possible?  (Read 20457 times)

0 Members and 1 Guest are viewing this topic.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #20 on: May 19, 2011, 11:19:03 AM »
One question I have is ZStartPoint can't be a constant unless it is only implemented at the start of the job.

Yes - that's why I called it ZStartPoint - it's run once at the start.

Have you run the macro yet? - I think you're thinking it needs to be run once for each slide - it doesn't. You just run the macro once and it does the whole shabang you asked for. It starts at ZStartPoint shows the first slide for the set exposure time, moves up by 0.01 and then down by 0.005 and then shows the next slide and so on till all the slides have been shown etc. and and it's down the pub for lots of beer - job done.
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #21 on: May 19, 2011, 01:28:35 PM »
Thanks again Stirling. I will run this script this weekend to test it out (I still need to install PP on my "garage" machine which currently runs Mach & my CNC router. I will set up a simple 10 - 20 slide presentation to test it out. I will let you know the results. I wasn't thinking the macro would run for each slide, I just thought the Z would go back to start for each slide which is good that it doesn't.  I'm not real good with code or scripts yet so I am just applying common sense to what I see in the script. I know, I'm still a bit "script ignorant" right now but I'm learning.

So basically, I just change the values in this section?  Do I insert any values below this section or is everything below good to go?

Code: [Select]
'*****************************************************************
Const ppFileName As String = "my documents\your PP folder\your PP.pps"
Const numSlides As Integer = 10 'number of slides in the show
Const exposureTime As Integer = 2000 'exposure time in milliseconds
Const ZStartPoint As Double = 0.0 'where Z starts from
Const ZIncrement As Double = 0.005 'the Z increment
'*****************************************************************

  Thanks again,
Jon

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #22 on: May 19, 2011, 01:39:29 PM »
So basically, I just change the values in this section?
Yup.
Do I insert any values below this section or is everything below good to go?
Nope - tis "good to go"

Ian
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #23 on: May 20, 2011, 06:18:14 PM »
Sterling. I forgot one thing. Can you adjust the macro to do the Z move every other slide? I forgot that there needs to be a blank(all black) slide between each image slide. So instead of moving on each slide, we need to move on every other slide.
So...Would you do this where it says "For s=1 To numSlides",  would you make it "For s=2 To numSlides"? Would that make it move every other slide?  Sorry I forgot this detail earlier, hope it's an easy fix. Thank you!  :)
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #24 on: May 20, 2011, 11:24:12 PM »
Or....I can use a "cut from black" transition in the slide show but right now the transition is too fast even on the slowest setting. I'm trying to get some help with PowerPoint to see if this is possible. If I can make a 5 second transition between each slide, that should make the screen black long enough to make the Z axis move before the next slide appears. Any PowerPoint experts out there?
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #25 on: May 21, 2011, 10:55:32 AM »
Stirling, I've not had success yet with the transitions for the slides which would allow your macro work as is, still working on that.

If I can figure out the transition timing and make it longer, I won't need any modification to your Mach macro. I'm also trying to get help with custom animation feature in PP because that also allows for fade to black and fade up from black on the slides so I won't have to add any blank ones in there.

Thanks for your help.  :)
« Last Edit: May 21, 2011, 11:10:02 AM by watsonstudios »
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #26 on: May 22, 2011, 07:59:00 PM »
Hey Stirling, the macro works great!  I was also able to go in and edit a few things just to see how it would effect the macro.  I was able to figure out that if I add additional Z increments, (.005 each) I can raise Z higher before coming back down.

For s=1 To numSlides
  Code "G1 Z" & ZIncrement + ZIncrement + ZIncrement + ZIncrement + ZIncrement + ZIncrement 'lift Z a couple of tads
  While IsMoving()
    sleep 10
  Wend
  Code "G1 Z-" & ZIncrement + ZIncrement + ZIncrement + ZIncrement + ZIncrement 'lower Z a tad
  While IsMoving()
    sleep 10
  Wend


So basically, with this edit,  I can move Z up .03 then back down .025 which might be better to let the resin flow better between layers.

Now I also tried to adjust the sleep time between the two moves but didn't seem to work. I added sleep time after the G1 Z move so there was more of a pause before going back down but it didn't seem to effect it. I put in 1000 instead of 10 (where bold). What am I missing here?

One more question: Does this macro control the timing of the slide show? Does it override the timing built into the PPT show?  It seems it did because when I played with the exposureTime integer, it still seemed to stay in sync with the slide show.

Thanks again for your help. Now I just need to figure my black screen issue. The Z move has to happen on a black screen so I've been trying to figure out the transitions and fade animations in PPT to accomplish this, still working on it.
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #27 on: May 26, 2011, 09:57:38 AM »
UPDATE:  I figured out my fade-in fade-out issue with Powerpoint so I will not need to add blank slides in between each image slide. I had someone write me a macro for PP to apply the same fade animations to all the slides at once.

I would still like to know if I can put a slight pause between the +Z move and the -Z move so when the Z goes up...pause(sleep)...then back down.

Thanks.

andrewm

*
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #28 on: May 26, 2011, 10:15:04 AM »
G4 will allow you to make a dwell(pause) between the moves.

G4 P.5 would dwell after a Z+ for half a second.

Is this what you were after?
« Last Edit: May 26, 2011, 10:19:25 AM by AndrewM »
Re: Controlling Mach with Powerpoint? Is this possible?
« Reply #29 on: May 26, 2011, 10:22:37 AM »
Yes Andrew, if the time parameter can be adjusted, I'm thinking 1 -2 seconds would be sufficient. Where would this be inserted into the macro?