Hello Guest it is November 14, 2019, 01:11:48 AM

Author Topic: ismoving() error message  (Read 5754 times)

0 Members and 1 Guest are viewing this topic.

Offline rufan

*
  •  37 37
    • View Profile
Re: ismoving() error message
« Reply #10 on: July 26, 2013, 02:35:21 PM »
OUTPUT6 activate the start/stop of the DC Thyristor Speed Controller.
Because this controller has no option to change motor direction.
I have put 2 relays that change the potential of the motor armature.

YES the locking pin shoot out when RPM is lower than 100.
Locking pin is spring loaded so no problem.
Actually the reason why <100, because vb is so slow in reading the RPM.
When vb see 100RPM the real actual RPM is already lower, so to save time I put <100, rather than wait for 0RPM

I have change the macro a little bit, and now it's working perfect without failing and without the sleep.
I will upload the new macro tomorrow I forgot to take it with me.

 

Offline rufan

*
  •  37 37
    • View Profile
Re: ismoving() error message
« Reply #11 on: July 30, 2013, 02:49:58 AM »
Still troubleshooting the Toolchange macro, not bullet proof yet.
I have change the macro a little bit. Toolchange run much better but still fail 1 out of 10 times.
Error line: 124 (while ismoving)

Also it is taking a long time to align the spindle don't know why or is vb that slow.
Watch movie:http://youtu.be/g4gQXqF95yI

Any better vb will be nice.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: ismoving() error message
« Reply #12 on: July 30, 2013, 05:07:33 AM »
Well you still have questionable logic in there. Also - why have you re-instated the API sleep - didn't you believe my earlier answer? Also - the while isMoving that fails should have a short sleep in it. I'm not saying this is WHY it fails or that it will fix your problem but it's not good practice.

Re: the speed of VB (CB) - trust me it's way faster than your mechanics - this is NOT the reason for slowness.

BTW - can you explain exactly what INDEX and OEMTRIG1 do? - I'm not sure why you appear to need TWO signals for alignment?

Offline rufan

*
  •  37 37
    • View Profile
Re: ismoving() error message
« Reply #13 on: July 30, 2013, 06:06:40 AM »
Damm uploaded the wrong file. This one is the one I use at the moment.

I have a double opto switch with a gap of 5mm. One output is INDEX and the other is OEMTRIG1.
Because the spindle needs to be very perfect aligned, I have used this dual opto switch.
So when both opto switch are triggered, the spindle is perfect aligned. The gap in the trigger ring is about 5,5mm.

I also tried below but did not help.
While ismoving
sleep 10
wend

About the speed.
When the spindle is stopped by the dynamic brake, it take some seconds before the spindle turn CCW to align spindle.
It looks like the command GetOEMDro(39) takes a while. When observe the spindle speed  DRO, I notice that the DRO has a refresh delay compared to the real spindle speed.

Offline rufan

*
  •  37 37
    • View Profile
Re: ismoving() error message
« Reply #14 on: August 02, 2013, 04:32:40 AM »
Dear Stiling,

Witch logic do you think is still questionable?
I want to make this tool-change bullet proof.

Thanks