Constructing Janus, by Dirk

Post your build logs here

Just because I can

Postby dirktheeng » Mon Sep 19, 2011 12:07 am

Just for the fun of it. A 1.25" cube:

DSCN4188.JPG
Cube
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Re: Using the douchman method to assemble pannels

Postby dirktheeng » Mon Sep 19, 2011 10:21 pm

I glued up the wood with plain yellow wood glue. The joints did ok. The were able to take some significant bending before breaking. When the joint split, the douchmans continued to hold well. I think that the laser cut edge didn't let the glue bond to the wood well and reduced the normal strength of the joints. That said, the douchmans held really well and were glued in strong. When I failed the joints, the plywood broke on the douchmans before the glue joint at the douchman let loose.

for important joints, it may be best to put douchmans close together or build them into the joint profile.
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Re: Constructing Janus, by Dirk

Postby dirktheeng » Sun Sep 25, 2011 11:59 pm

I decided that it was time to make the "permenant" ventalation system and replace the cardboard jurry-rig that i had for a short time.

I modified the design to put some handles on to let me get the thing in and out of the window easier. Here's what I cut out:

DSCN4197.JPG
Front view of the window vent


The handles allow me to grab it out of the window frame and set the side pannels into the window. There's wing nuts that allow me to tighten everything down and set it in the window. I used adhesive backed foam to seal around the outside. It works really well.

DSCN4198.JPG
Back (outside)


This is a view of the outside part. I put horizontal stretchers on it. This makes the main part really stiff and keeps it from vibrating much. It is very quiet as a result.

I doubled up 2, 1/4" pieces of plywood in the front to recieve a 4" to 6" adapter. The fan is a ~6" diameter fan and the outlet of the laser is 4". I cut down the adapter on the 6" side so it only had 1/2" sticking out and kringled it with a wire cutter to make it fit well. It worked very well and the flange sits right up against the plywood.

DSCN4200.JPG
Atapter


There is a 1/2" dato-like structure near the inside of the window. The side pannels expand to fit into those datos.

DSCN4204.JPG
How it fits in the window


Once it is in the sides, I just shut the window down on the top and the foam seals it up nice and tight.

DSCN4201.JPG
Test fit


I used silicone calking to seal around the adapter and duct tape to seal around the 4" flex hose. Since the fan is on the outside, every potential leak point on the inside will result in inflow into the system and will get vented out.

Here's a couple finished install photos:

DSCN4205.JPG
Finished Install


I added a few screws around the perimeter to hold the flange in and take the stress off the silicone and make sure it maintains a good seal. When it's installed, I stuff a towel in the crack between the top of the bottom frame and the top window pane. It may seem a bit hokey, but it does keep a good seal and keeps allows me to put extra down force on the seals.

DSCN4203.JPG
Pulled out of the window


This system is increadibly quiet and moves a good deal of air. I cut acrylic tonight for a few hours testing different settings and seeing what it did for edge quality and such. As long as the door stayed shut, I could not smell anything at all. It moves a lot of air. Some people said that an axial fan would not work, but it does very well. It moves over 200cfm and is very effective. It only cost $20 and it is very quiet. The air pump is louder than this fan and it is very comfortable to have a conversation in the room while everything is on. I can even hear my wife in the kitchen when she calls me.
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Reading a flow meter through Mach3, arduino, and brains

Postby dirktheeng » Wed Sep 28, 2011 4:41 pm

Ok. I've finally started to mess with the more advanced stuff I have been planning for a little while. As I've stated before, I wanted to use an arduino as a Modbus device to do several things for me in Mach 3. I've been a bit concerned with my pump because I can never tell if it is on or not so I put the coolance flow meter inline and sure enough I had flow. However, I wanted to know how much and be able to sound an alarm if there was a problem, so I picked this aspect to start with in Mach3/modbus/arduino/brains.

First, let's discuss the hardware setup. For those of you that don't know about the flowmeter I'm using the INS-FM17N. It is a strait through flow meter. I chose this one as opposed to the pattle wheel because I have read some reviews about the pattle wheel that said it can get stuck and block the flow. This one can't do that if it fails. Here's a pic:

ins-fm17_p0.jpg
Koolance Flow Meter


The black disk with the white stripe spins axially. Basically, this thing acts as a momentary switch where it switches from off to on once per revolution. So I set up the arduino to read a pin and set the internal pull up resistor to on. This can be accomplished by the following:

Code: Select all
void setup()
{
        /* Modbus setup example, the master must use the same COM parameters */
        /* 115200 bps, 8N1, two-device network */
        configure_mb_slave(115200, 'n', 0);
        pinMode(flowPin, INPUT);
        digitalWrite(flowPin, HIGH);
}


Be sure to put this in the setup function. flowPin is a variable I set to 7. the pinMode function sets pin 7 to input and then writing a high to that pin with the digitalWrite funciton sets the internal pull up resistor to on. So now I wired from pin 7 throught he flow switch to ground. That way when the switch is closed the pin sees ground and when it is open, the pin sees a high. The arduino was connected to my Mach3 computer via USB and was assigned a com port value of 3 (1 is my smooth stepper).

On the Arduino side of things, I used the same ModBus slave program that Bart used in his post, but modified the code as follows:

Code: Select all
int flowPin=7;
unsigned long tnew = millis();
unsigned long told = millis();
int total = 0;
boolean flowPinStatePrev = LOW;
boolean flowPinStateNow = HIGH;
int flowRate;
const int RCount = 10;
int count = 0;
int index = 0;
int tstore[RCount];


void setup()
{
        /* Modbus setup example, the master must use the same COM parameters */
        /* 115200 bps, 8N1, two-device network */
        configure_mb_slave(115200, 'n', 0);
        pinMode(flowPin, INPUT);
        digitalWrite(flowPin, HIGH);
}

void loop()
{
        /* This is all for the Modbus slave */
        regs[0] = flowFunc();
   update_mb_slave(MB_SLAVE, regs, MB_REGS);

   /* your code goes here */
}


Code: Select all
/*
flowFunc

  Inputs: N/A - use global varriables
  Outputs:
        flowRate -> this is the calibrated flow rate multiplied by 1000
  Comments:
        This function uses persistant variables and operates on them to calculate
        a calibrated flow rate in LPM*1000 using the koolance flow meter INS-FM17N
        The function needs to be in a loop that will operate at at least 100Hz to be
        able to catch and count the leading edge from the flow meter with flows up
        to about 10 LPM.  The function counts the number of revs in 1 second and then
        keeps a running average over 10 seconds and returns this value.
*****************************************************************************/

int flowFunc(){
//  int *fr=&flowRate+1;
//  return(*fr);
  flowPinStateNow = digitalRead(flowPin);
  if (flowPinStateNow ==HIGH) {
    if (flowPinStatePrev == LOW) {
      count += 1;
    }
  }
  tnew = millis();
  if ((tnew - told) >= 1000){
    total = total - tstore[index];
    tstore[index] = 0.28*count*1000;
    total = total + tstore[index];
    flowRate = int(float(total)/float(RCount));
    if (index >= RCount){
      index = 0;
    }
    count=0;
    told=tnew;
    index += 1;
  }
  flowPinStatePrev=flowPinStateNow;

  return(flowRate);
}


This code is not optimized for speed or memory use, but it doesn't have to be now. It functions and does the job it needs to do without much effort so I am calling it good. If others have suggestions or want to modify it, please do... just let me know what you did to improve it. As the function states, it gives a running average of 1 second rev counts. The output values are fairly constant and it does ok. I was surprised to see the varriation in the number of cycles though. I don't have a scope to see what the pin signal looks like so I will have to assume that it is indeed a cheap flow meter and/or the pump shows some varriation in flow. (I am asking my wife for a scope for Christmas this year).

That takes care of the arduino and hardware setup. The really hard part of getting this right was learning how to get Mach to interface properly with this stuff. I could get the test registry to read the registry value (regs[0]) in the arduino, but it took me a good deal of time to figure out how to get this thing to work with a brain. It turns out that you have to use the new plugin for modbus and then set the brain to read slave address zero when the Modbus is set up to slave address one. This was not easy to figure out because the documentation for this is fairly poor and all the instructional stuff on Mach3 is geared towards a standard modbus device which uses a pre-defined setup package. Anyhow, I will go through the screens you need to set to get this to work.

The first thing you need to do is add a user DRO to a screen so you can address it without screwing other things up. This is very easy with a program called "machscreen". You can find it by googling it or folowing links from the artsoft website. On opening the program, I opened the 1024 screen file in the mach3 directory.

machscreen screenshot.JPG
Machscreen


To add a DRO, you go to the "control" feild and click on the drop down box and select DRO. Then click on the Add button and click somewhere on the mach3 screenset. This will place the DRO. You can move it about and change its properties. The one thin you will want to do is change the OEM code to something between 1000 and 2500. I chose 1000. This gives you a user addressable value in Mach. You can do the same kind of proceedure to add a text lable, but you don't have to. Play around with it and see if you can get it to work. You can add/eddit/or make your own screens in Mach this way. Make sure you save the changes before quitting. Now when you open Mach3, your new DRO and lable will be there even though it does nothing at this point.

To make it do somethin we have to set up the Modbus properly and make a brain. Lets start with the modbus:

Once you know what settings you need, it is very easy to use the modbus... it just took me a while to get there.

First, go to the ports and pins screen under the config menu and make sure that both the Modbus InputOutput Support and Modbus Plugin Supported are checked. Hit OK and restart Mach3. I couldn't get the brain to work with out using the plugin and the plugin interface is nice too.
ports and pins.JPG
ports and pins


Next we have to configure the Modbus. Under the Functions Cfg's menu, select Serial Modbus Control. You should get a screen like the following:

ModBusConfig.JPG
ModBus Config


When you first come to the creen the Cfg #0 will be blank. Check the Enabled box, put in the com port for the arduino, set the slave addr to 1, pick a refresh rate (I chose 100, but you don't have to), put a registry address in the addresses box (I set the flow rate to write to regs[0] in the arduino so that is the address I put here), give it a number of registers to read (in this case just 1 as an analog value, but if you were using a digital in array you could use more... Also if you put more than 1 register in there when you are reading the signal for the flow meter, it will not work at all... I haven't figured out how to set it to read multiple registers and then select one of the ones it reads to do somethin with), and set the direction to Input-Holding. Also, be sure to check the ModBus Run checkbox. If it is working ok, you should see No Error. The timeout value isn't so important, but they say it should be above 100ms. The Baud rate and paraty should be set as shown unless you go and change the code in the arduino. You can test the modbus by going to the Test Modbus. If you set it to read register zero it should give you some non zero value and it should change somewhat every time you read it if the pump is on.

This should allow you to use a brain or macro pump now to do something. I used a very simple brain to read the modbus and send the value to the DRO I made. Go to the Operator menue and select Brain Editor. Give it a name and hit ok (you can launch this program outside of Mach3 too... see documentation on Mach3 website).

The big tricks here were to use the plugin and to subtract one from the slave address put into the modbus setup. When you're done, the brain should look like this:

SimpleBrain.JPG
Brian


The settings for the brain Modbus Input should be like this:

BrainModbusInput.JPG
Brain Modbus Input


Don't ask me why the slave address isn't the same as the one set up in the modbus setup, but I think everything is moved down 1 number here. If you want to add a second input or change this one, put the information in the ModBus Configuration on a different Cfg # line and reference it in the Brains screen here. That's how you can select multiple input values using a brain. They can go in the same brain or a different one... your choise.

The setup for the brain DRO looks like:

BrainModbusDRO.JPG
Brain User DRO


It doesn't matter which DRO is in the pull down menu, just select User DRO and give it the number you assigned the DRO in the screen editor. Make sure you save the brain in the Mach3\brains folder or it wont pick it up as a selection to turn on.

The final thing you have to do is turn the brain on. Go to the Operator menu and select Brain Control. If you saved the brain you made in the Mach3\Brains folder, you will see it in the list that pops up. Select your brian and then hit the enable check box. It should start working immediately and will continue to work without user input during any Mach3 session until you uncheck that enable box.

The nice thing about this setup is that I can select user DRO 1000 as an input ot a seperate brain and make it do somehting like compare it to a minimal value and turn on/off a switch or input.

Here's a summary video:



Next up: writing PWM to control fan/pump speed via the same interface and reading a laser current via a spark fun I2C chip. I won't detail everything so much next time as this was the hard part.
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Video Demonstration of Ventilation System

Postby dirktheeng » Wed Sep 28, 2011 7:27 pm

I recieved a couple requests to show the effectiveness of the ventilation system I made so I decided to try to make a video and post it. It is currently uploading to youtube. I don't have much to compare this to as I haven't tried anything else, but the couple things I can say is that the system is more than effective to contain any fumes. Further, it provides a lot of air circulation and movement within the unit. The thing I don't much care for is the pattern of circulation. Because the vents are at the top of the unit only with no vents at the bottom, the smoke tends to move from the bottom of the unit towards the front, move up to be inducted into the high velocity flow from the vents and then be shot back to either go out the back or recirculate again depending on where it is. I don't think this is a result of possible lower air flow than others, but I could be wrong. it definately depends on where the piece I'm cutting is put on the table too.

The biggest problem with the smoke is not the ventilation, but the table itself. The wide/flat bars I have on this thing are a problem because I get selective staining of the workpiece anywhere it touches the table. The nozzle velocity is good enough to push the smoke down and away from the workpiece as it's cutting, but nothing will help it if it is getting blocked at the outlet. I am going to replace this table at some point. Areas away from the ribs look nearly perfect... even better than the top surface.

The only other thing is that the air pump isn't always strong enough to blow out the flame on the back side of acrylic when I cut thicknesses at and above 1/4". When it flames, it melts the edge some and I get what looks like bubbles on the surface of the cut edge. I may try a stronger air pump at some point. That may help reduce surface staining on the top too, but that isn't a big deal because you can cover that with tape when you cut too (probably should regardless because you will never get rid of all of that staining).

Here's the video:

Last edited by dirktheeng on Wed Sep 28, 2011 8:03 pm, edited 1 time in total.
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Re: Video Demonstration of Ventilation System

Postby BenJackson » Wed Sep 28, 2011 7:43 pm

dirktheeng wrote:The thing I don't much care for is the pattern of circulation. Because the vents are at the top of the unit only with no vents at the bottom, the smoke tends to move from the bottom of the unit towards the front, move up to be inducted into the high velocity flow from the vents and then be shot back to either go out the back or recirculate again depending on where it is.


That definitely doesn't happen with the dust collector I'm using. You can watch the outlet (where it's blowing out of the house) and see a puff of smoke for each cut.

I didn't really get it to have such ridiculous suction: I got it so I could put it far away and still have sufficient suction. Right now it's about 3' of hose away, though.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Video Demonstration of Ventilation System

Postby dirktheeng » Wed Sep 28, 2011 8:01 pm

BenJackson wrote:
dirktheeng wrote:The thing I don't much care for is the pattern of circulation. Because the vents are at the top of the unit only with no vents at the bottom, the smoke tends to move from the bottom of the unit towards the front, move up to be inducted into the high velocity flow from the vents and then be shot back to either go out the back or recirculate again depending on where it is.


That definitely doesn't happen with the dust collector I'm using. You can watch the outlet (where it's blowing out of the house) and see a puff of smoke for each cut.

I didn't really get it to have such ridiculous suction: I got it so I could put it far away and still have sufficient suction. Right now it's about 3' of hose away, though.



It isn't that bad... I can see puffs of smoke out my window too right when it cuts. It's not like it lingers around but it doesn't go strait fromt he cut to the vent all the time... it does depend on where it is cutting too. Post a video of yours cutting too so we can compare. It's dificult to compare opinions of an observation and somebody's description. (you posted this before the video I wanted to upload was done so maybe things will be different when you see what it does).

There's no doubt that more air flow is going to be helpful, but I think it is a diminishing return too. I don't see any discoloration from the cut on the botom of this stuff (aside from where it hit's my table) and I think the movement is sufficient to keep the smoke from condensing to any considerable ammount on any of the surfaces. After a few weeks of hard use, I may have to clean up my window a bit, but that's about it. I just cleaned it after probalby 10hrs of accumulated cutting time and there was just barely a discoloration on the paper towel. I'll check my optics for any discoloration or anything here too.

Beyond this, I don't know what more air flow is going to get me besides more noise and more expense (my ventilation system only cost me about $35 total plus some shipping). Again, this is a matter of personal preference too and it is very hard to come to a really good conclusion without seeing side by side comparisons with the same system. The end result is really the quality of the cut and the safety of the environment you work in. I would say that I am definately safe during operation and that I am skeptical that I could increase the quality of my product by increasing the flow.

Edit: I just pulled the mirror off the gantry cart to check it and there was no noticable residue on it at all. I have had it have buildup in the past when I wasnt' using the air assist, but after several hours of cutting there was nothing to be seen.
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Adding Integral control

Postby dirktheeng » Sat Oct 01, 2011 12:46 am

All,

I decided it would be good to add some automatic controlls to the system. After playing around with it for a while, I found that the system is slow enough in responding that only integral control was needed. It was easy to implement. It usually gets to within 20% of the setpoint within about 10 seconds or so. Good enough. Arduino's PWM is super easy. You just write a value between 0 and 255 to the pin. The PWM response of the pump is a bit weird. I was wrong about the 0 being the minimum, it gets the maximum flow rate. Then at anything between 1and 45 is off and then it responds roughly linearly to about 145 or so and is flat max out anything above. I added another DRO input as a setpoint sent it to the arduino multiplied by 1000 through another simple brain. See the screenshot and the code.

There is a bit of something I don't quite understand here too because it usually hovers a bit above the setpoint and I haven't figured that out yet. Anyhow, I plan to get a teperature sensor and use some thermal epoxy to glue it to the side of the laser head and control the setpoint based on that temp reading.

IngetralControl.JPG
Integral Control


Code: Select all
int flowPin = 7;
int pumpPWMPin = 9;
unsigned long tnew = millis();
unsigned long told = millis();
int total = 0;
boolean flowPinStatePrev = HIGH;
boolean flowPinStateNow = HIGH;
int flowRate;
const int RCount = 10;
int count = 0;
int index = 0;
int tstore[RCount] = {0};
float I = 50;

void setup()
{
        /* Modbus setup example, the master must use the same COM parameters */
        /* 115200 bps, 8N1, two-device network */
        configure_mb_slave(115200, 'n', 0);
        pinMode(flowPin, INPUT);
        digitalWrite(flowPin, HIGH);
        pinMode(9, OUTPUT);
        digitalWrite(9, LOW);
        TCCR1B = TCCR1B & 0b11111000 | 0x01;
        //tstore[0]=0;
}

void loop()
{
        regs[0] = flowFunc();
        if (regs[1] < 0) {regs[1] = 0;}
        if (regs[1] > 2200) {regs[1] = 2200;}
        I = I + 0.0000003*float(regs[1] - tstore[index]);
        if (I < 40) {I = 40;}
        if (I > 150) {I = 150;}
        analogWrite(pumpPWMPin,I);
        update_mb_slave(MB_SLAVE, regs, MB_REGS);
}


Code: Select all
int flowFunc(){
  flowPinStateNow = digitalRead(flowPin);
  if (flowPinStateNow ==HIGH) {
    if (flowPinStatePrev == LOW) {count += 1;}
  }
  tnew = millis();
  if ((tnew - told) >= 500){
    total = total - tstore[index];
    tstore[index] = 0.28*count*1000*2;
    total = total + tstore[index];
    flowRate = total/(RCount);
    if (index >= RCount-1) {index = 0;}
    count=0;
    told=tnew;
    index += 1;
  }
  flowPinStatePrev=flowPinStateNow;
  return(flowRate);
}
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Bug fix and addition of simultanious control of fan speed

Postby dirktheeng » Sat Oct 01, 2011 3:34 am

I found the bug that was causing an offset in the display. It was related to the initalization of the system. The pump is set to be on full blast at the start up to make sure i have power. Then when the loop starts, it goes to whatever value it needs to be, but that takes a few seconds which was causing my count not to start at zero. I added an initialization to the loop which sets the pump to zero for 2 seconds and sets all the pump initial values to zero. This fixed the problem.

Also, I made the PWM fans track linearly with the pump set point. Now I can use a thermistor to read the temp of the laser head and set the pump flow rate and the fans will track with that. This will minimize the noise and wear on the system. Now my computer is louder than the cooling system and when I put the temp sensor in, I will have an automated system to make sure that the laser temp is safe. This is kindof fun!

Heres the updated code:

Code: Select all
int flowPin = 7;
int pumpPWMPin = 9;
int fanPWMPin = 10;
unsigned long tnew = millis();
unsigned long told = millis();
unsigned long tstart = millis();
int total = 0;
boolean flowPinStatePrev = HIGH;
boolean flowPinStateNow = HIGH;
int flowRate;
const int RCount = 10;
int count = 0;
int index = 0;
int tstore[RCount] = {0};
float I = 50;

void setup()
{
  /* Modbus setup example, the master must use the same COM parameters */
  /* 115200 bps, 8N1, two-device network */
  configure_mb_slave(115200, 'n', 0);
  pinMode(flowPin, INPUT);
  digitalWrite(flowPin, HIGH);
  pinMode(9, OUTPUT);
  digitalWrite(9, LOW);
  pinMode(10, OUTPUT);
  digitalWrite(10, LOW);
  TCCR1B = TCCR1B & 0b11111000 | 0x01;
  //tstore[0]=0;
}

void loop()
{
  if ((millis()-tstart) <= 2000){
    for (int i = 0; i < RCount; i++) {tstore[i] = 0;}
    regs[1] = 0;
    total = 0;
    count = 0;
  }
  regs[0] = flowFunc();
  if (regs[1] < 0) {regs[1] = 0;}
  if (regs[1] > 2000) {regs[1] = 2000;}
  I = I + 0.0000003*float(regs[1] - tstore[index]);
  if (I < 40) {I = 40;}
  if (I > 150) {I = 150;}
  analogWrite(pumpPWMPin,I);
  analogWrite(fanPWMPin,regs[1]*float(255-30)/2000+30);
  update_mb_slave(MB_SLAVE, regs, MB_REGS);
}


Code: Select all
int flowFunc(){
  flowPinStateNow = digitalRead(flowPin);
  if (flowPinStateNow ==HIGH) {
    if (flowPinStatePrev == LOW) {count += 1;}
  }
  tnew = millis();
  if ((tnew - told) >= 500){
    total = total - tstore[index];
    tstore[index] = 0.28*count*1000*2;
    total = total + tstore[index];
    flowRate = total/(RCount-1);
    if (index >= RCount-1) {index = 0;}
    count=0;
    told=tnew;
    index += 1;
  }
  flowPinStatePrev=flowPinStateNow;
  return(flowRate);
}


The max flow rate is 2 LPM which is way more than enough. I think most of the time, it will run at about 0.5 to 0.75.
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Changing Mach3's ref all button

Postby dirktheeng » Sat Oct 01, 2011 6:48 pm

One of the things I want to do is set up the system to do autofocus, which basically means setting up to do a reference on the z axis. I need to get a momentary switch and wire it up to the control board. I don't have one yet and I was going to go to radio shack in town here during the WVU game (the only time I can go when traffic isn't nuts on a game day). I plan to make a switch setup that i can hight adjust to get it to zero at the focal plane. The switch assembly will attach to a magnet on the x axis carraige. I wanted to be able to remove it so I didn't add a whole bunch of weight to the carraige which could affect the cut and slow down how fast I can engrave something (when I get the engraver set up). This way, I can pop it on, ref the z to wherever it needs to go and pop it off easily.

Doing the reference this way meant that i had to be able to select whixh axis to reverence and which order. I wrote a visual basic script to open up a dialog box and allow me to select which axis to reference (X, Y, Z, 4, and all). The first one to reference is Z in all cases. Basically, I would move the carraige over the work place so the probe was going to contact the flat surface of the workpiece. Then hit ref all and make sure the z axis was selected. I can select just the x and y as well if I don't want to reference the z.

Heres the code:

Code: Select all
Sub Main
   Begin Dialog CheckSample 15,32,149,96,"Check Boxes"
   OKButton 92,8,40,14
   CancelButton 92,32,40,14
   CheckBox 12,8,50,8,"Reference X",.XBox
   CheckBox 12,24,50,8,"Reference Y",.YBox
   CheckBox 12,40,50,8,"Reference Z",.ZBox
   CheckBox 12,56,50,8,"Reference 4",.FourBox
   CheckBox 12,72,50,8,"Reference All",.AllBox
End Dialog
   Dim Dlg1 As CheckSample
   Button = Dialog ( Dlg1 )

If Button = 0 Then Exit Sub

If Dlg1.ZBox = 1 Or Dlg1.AllBox = 1 Then

   Begin Dialog ButtonSample 16,32,180,60,"Z Axis Reference Set?"
      OkButton 16,40,40,14
      CancelButton 124,40,40,14
      Text 16,8,164,8, "Is the Z Probe in Place and the Laser Head"
      Text 16,16,164,8, "Positioned? Ok for Yes, Cancel for No"
   End Dialog
   Dim Dlg2 As ButtonSample
   Button2 = Dialog (Dlg2)
   
   If Button2 = 0 Then
      MsgBox("Set up Z Reference Hardware and Retry.")
      Exit Sub
   End If
   DoButton( 24 )
End If

If Dlg1.XBox = 1 Or Dlg1.AllBox = 1 Then
   DoButton( 22 )
End If

If Dlg1.YBox = 1 Or Dlg1.AllBox = 1 Then
   DoButton( 23 )
End If

If Dlg1.FourBox = 1 Or Dlg1.AllBox = 1 Then
   DoButton( 25 )
End If

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)

End Sub
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

PreviousNext

Return to Build Logs

Who is online

Users browsing this forum: No registered users and 3 guests

cron