![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Haas Mills Discuss Haas machinery here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| Here is one for all you macro gooroos. ![]() I am writing a macro that engraves the date on my parts. And my question is, is there a way to get the date out of the control in order to use it in my macro? One of my operators says that there is a place to input the date in the controller. So my thought is that there should be some way to get it out and use it so I don't have to worry about the operator inputting the wrong date or forgetting to change it at all. the machine is a 2008 haas vf2 ss Thanks, |
|
#4
| |||
| |||
| oh boy, I can see it now....machine is pulling an all nighter and begins engraving the date into a part like normal. But then halfway through the feature the clock rolls over midnight, and all of a sudden the parts are dated a month behind! quick lets contact those fantastic engineers that saved everyone from Y2K!! |
|
#6
| |||
| |||
Does anybody want the solution to a "rollover" in date as suggested by Ydna? Here is one used by the computer programmer geeks: 1) Read the year, month, and day into a macro variable. 2) Read the year, month, and day AGAIN into a different macro variable. 3) Check that number from step 1 equals that from step 2 4) If numbers are equal, great, use them. 5) If numbers are not equal, read them again and use those. AND remember please, on January 1st, 2000, the world did NOT burn down. |
|
#7
| |||
| |||
| I think that would work. Depending on exactly what the numbers were used to determine (cost/product version/etc) you could probably default to making the "check" again, and use those numbers. I mean as long as they make sense with one another it hopefully wouldn't be that big of a deal. But if it did indeed matter that a part was stamped one day ahead or behind, you'd have to figure out what to do in that situation. If I were doing it, I'd pick aside a few free macro registers and use them to hold all the necessary numbers you get from the #3011/#3012, the key being that all the values would be instantly stored instead of being addressed one-at-a-time during the engraving routine. So instead of calling the #3011/#3012 values directly, you'd call the new "phantom" registers instead, which have already been set and won't change until the next program run. It's not theoretically perfect, since *technically* the Haas control could roll over to new numbers during the program's line-to-line scan time, but that's pretty unlikely since it'd be at MAX a couple milliseconds difference. If that's bothersome then maybe performing a checking routine like you suggest would indeed be the final way to go. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help!- Macro Variables | donwatt | Controller & Computer Solutions | 0 | 06-25-2010 12:30 PM |
| Mits M635 (Citizen) Time & Date Variables | JMS4287 | Mazak, Mitsubishi, Mazatrol | 0 | 01-24-2008 02:05 PM |
| macro variables | sinha_nsit | Fanuc | 5 | 01-15-2008 03:42 AM |
| Date and Time Variables? | broby | Okuma | 19 | 12-11-2007 04:12 PM |
| Variables/Macro use ???? | theemudracer | G-Code Programing | 2 | 12-11-2006 09:47 AM |