Hello Guest it is December 26, 2024, 05:50:17 AM

Author Topic: VB or Brains Question  (Read 23139 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
Re: VB or Brains Question
« Reply #30 on: August 14, 2010, 12:08:42 PM »
That is because your dos and fanuc controllers are running in real time(;-)

OK I have to ask (;-) Why do you stop the machine to go on break? 

So far testing brains I have not found a dependable way to use the bedlock feature inside of the G81 cycle . I have gotten close BUT the Computer I am testing with DOES NOT like brains and runns them very slow ,about as slow as the macropump. But testing continues(;-)

Re: VB or Brains Question
« Reply #31 on: August 14, 2010, 03:46:39 PM »
They pause it for breaks because the drilling we do can go really wrong really fast in no one is watching.

I think brains should run fast on my system since it is using a galil motion card on ethernet and a Click PLC with modbus for the outputs, so no printer port.

I have the card and plc all setup with mach but I havent connected it to the servo amps since I want to get all the motion clamps and tool change setup first.

Offline BR549

*
  •  6,965 6,965
Re: VB or Brains Question
« Reply #32 on: August 14, 2010, 09:19:25 PM »
HUM, Galil motion card. You may want to ask SteveMurphy about this one. Sometimes the motion card controls things differently than direct control from a PP.

So far The brains don't have the resources available to do this. I can get close but not close enought that "I" would use it. The problem comes when the Z cross the 0.000 and positional values reverse sign. There is no way I can find to address the problem. I can make the Bedlock active when it crosses the 0.000 and stay on until it comes back across. But you need it to lock as soon as it moves going down and release after it stops going up

(;-)
Re: VB or Brains Question
« Reply #33 on: August 17, 2010, 05:14:02 PM »
Well I think I have a working brain program for this.
I took 3 values, Xtogo Ytogo Ztogo
Made them all have a =0 check
Inverted the Ztogo = 0 check
Then did a AND on all 3 and route it to Output #1

So it is basicly If (Xtogo and Ytogo = 0) AND (Ztogo is not 0) then clamp the bed.

It looks like it is working in simulation, but do you see any problems with it?

Offline BR549

*
  •  6,965 6,965
Re: VB or Brains Question
« Reply #34 on: August 17, 2010, 07:38:32 PM »
WEll if the brains are fast then when the Zaxis gets to the end point of the Zmove the bed will unclamp then reclamp as it starts the next up move. The TOGO should report the distance to the end of each linear move. So when it gets to the bottum of the stroke it should reset for the move up.

It should be as simple as if Z axis is moving then clamp.    IF  Zfeedrate > 0 then activate output#1        SO then IF Zis moving clamp but then you need to deal with the bottom of stroke when vel = 0 and it restarts the upstroke.  YOu could then add a routine that prevents the unclamping unless Zpos > 0.000 so it can only unclamp if the stroke is above 0.000


During the drill cycle there are no z interpolated moves with x/y. BUT here the brain does not release controll and unclamp when Z actuall stop at the top of the stroke. IT SHOULD but does not.

This computer and brains have never really gotten along(vista) SO it it hard to tell what is real or not.

SO only real world testing is going to tell the story. Give it a whirl
« Last Edit: August 17, 2010, 07:46:18 PM by BR549 »
Re: VB or Brains Question
« Reply #35 on: August 17, 2010, 10:55:23 PM »
I have mapped the output#1 to a relay on the PLC and I cannot see it unclamping at the bottom of the stroke. It seems to stay clamped from the start of the hole till the retract is finished.
But I don't have motors hooked up yet to fully see how it plays together.

Offline BR549

*
  •  6,965 6,965
Re: VB or Brains Question
« Reply #36 on: August 18, 2010, 01:03:23 AM »
Give it a try (;-)

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
Re: VB or Brains Question
« Reply #37 on: August 18, 2010, 03:11:48 PM »
Dave3891,

     Here is a little plug that you can use, you can use a custom M code to turn on and off a User LED that while it is on, then when Z goes below 0.0 the OUTPUT1 goes hot, the config on it is so you can pick what ever UserLED number you want, and you can also pick OUTPUTs 1-6,

further you can choose to use the Para Port, and/or you can also send the result of the Output you choose, to the Serial Plugin Modbus and you can choose the Config and Local var you want. NOTE: you will HAVE to have the Serial Plugin Modbus configured and working otherwize if you send to the modbus that is NOT working it will estop mach since it is an error.

The built in Modbus is so you can send the result of the OUTPUT1 directly to the Serial Plugin Modbus.

Defaults are:  Z level 0.0, OUTPUT1, ParaPort output (it has a memory so you can configure something different). the LESS than Z 0.0 is hardcoded in the plugin.

so once you run lets say M8888 that inside it you turn on "SetUserLED(1500,1)"
then once that LED is ON, any time your Z goes below 0.0 the OUTPUT1 (or 1-6 as options), which that output can be sent via standard PP (that in turn could be used in Brians or VB, or paraport direct), AND/OR you could send it out directly over the modbus.

Once all your many drilling cycles are done, you would run for example M8889 that would turn OFF  User LED1500 and that would disable the clamp function.  "SetUserLED(1500,0)"

You could also put 2 custom BUTTONs on your run screen that could turn on the other off the UserLED 1500 for example.

scott
fun times

Offline BR549

*
  •  6,965 6,965
Re: VB or Brains Question
« Reply #38 on: August 18, 2010, 09:17:58 PM »
Hiya Scott, I think the idea was to have the clamp set as the z starts to move down(before0.000) and release after the z clears 0.000 going up to the top again. I was working on a brain to sense Zdirection but could not get it perfected, close but not perfect.
(;-)

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
Re: VB or Brains Question
« Reply #39 on: August 18, 2010, 10:50:21 PM »
Ok I will modify the plugin for you, in such that you put the Activate/Deactive clamp value (as a double), into the Z height box.  for instance if you Z Negative is going down toward your table and Z positive is away from the table.

I will set it like this, the Clamp will activate, when the Z axis is moving down AND the Z axis is below the clamp trigger hiegth. Then the Clamp will Unclamp when the Z is moving up ward and also be above the Clamp hiegth.

So you could put your Z travel, somewhere between the Top of your material, but below the Z Clamp hieght while your in the Drill cycle(s).

scott
fun times