Hello Guest it is April 18, 2024, 06:50:09 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - watsonstudios

Pages: « 1 2 3 4 5 »
21
Thanks again for all your help!  Here's a video I made of the macro in action.

http://www.youtube.com/watch?v=Kc0pd-WNfqI

22
No problem, Thank goodness I don't need that now since I finally got PPT to add the fades in where I need them.
Thanks again.

23
Thanks, I will try this but I think I solved my problem on the PowerPoint side. I was able to put a fade in and fade out into the slides so the screen goes black before the Z axis moves again. So far, this has worked well.

I understand your adding another G4 delay but what I asked may have been misleading. I don't need a delay in machine movement, I need a delay in calling the next slide from PowerPoint.

I want the machine to do it's thing....then instead of loading the next slide when it does now, I would need to wait a second or two before asking PPT to open the next slide. Hope that clarifies things.

Thanks again for the help on this. :)

24
Andrew, The "G4 P2" worked perfectly right before the "While IsMoving()". Thank You!

Now my next question: Can I put in a delay before calling the next slide from PPT?  Right now, the next slide gets called up right when the Z hits it's final position. I would like to delay the next slide just a tad, maybe a second, before it appears. That way the Z is in place before the next slide is displayed.

Would it have to be added this into this section? (just guessing)
objPresentation.SlideShowWindow.View.GotoSlide (s) 'show the next slide
  sleep exposureTime
Next


I'm not sure at what line of code that it calls the next slide but I need a time delay right before it does. Thanks again, I'm getting very close to what I need here.  :)

25
Thanks guys! I will try this:

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

I only need the delay after the first move. I will try this out in the next couple hours and let you know if it worked.
Thanks again!
Jon

26
Here is the finished macro:


Option Explicit

'Change the five constant values below to suit
'*****************************************************************
Const ppFileName As String = "my documents\your PP folder\your PP.pps"
Const numSlides As Integer = 20 '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
'*****************************************************************

Dim objPPT
Dim objPresentation
Dim s As Integer

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Open(ppFileName)

Code "G90" 'absolute distance mode
While IsMoving()
  sleep 10
Wend

Code "G0 Z" & ZStartPoint 'start Z at wherever
While IsMoving()
  sleep 10
Wend

Code "G91" 'incremental distance mode
While IsMoving()
  sleep 10
Wend

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

  objPresentation.SlideShowWindow.View.GotoSlide (s) 'show the next slide
  sleep exposureTime
Next

Code "G90" 'back to absolute distance mode
objPresentation.Close
objPPT.Quit

Here is the finished macro. There is a "sleep" parameter after the +ZIncrement "IsMoving" but that had no effect when changing this value.  So would I add the G4 P2 after the Wend, before the Z- move? (red highlighted area)

27
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?

28
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.

29
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.

30
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.  :)

Pages: « 1 2 3 4 5 »