586,115 active members*
3,476 visitors online*
Register for free
Login
Results 1 to 17 of 17
  1. #1
    Join Date
    Jul 2005
    Posts
    29

    M109 Interactive User Input

    Hi Guys

    has anyone ever used the Haas code M109? i have been trying the code below [from the Haas question man], but just get error 331. the manual just says 'range error-number too large' which does not help me much. any ideas?

    thanks in advance

    axis

    %
    O00233
    (M109 INTERACTIVE USER INPUT)
    (Require Y/N input)
    N1 #501= 0.
    M109 P501
    N5 IF [ #501 EQ 0. ] GOTO5
    IF [ #501 EQ 89. ] GOTO10 (Y)
    IF [ #501 EQ 78. ] GOTO20 (N)
    GOTO1
    N10
    M95 (00:01)
    GOTO30
    N20
    G04 P1.
    N30
    M30
    %

    %
    O00234
    (M109 INTERACTIVE USER INPUT)
    (Require 1/2/3 input)
    N1 #501= 0.
    M109 P501
    N5 IF [ #501 EQ 0. ] GOTO5
    IF [ #501 EQ 49. ] GOTO10 (1)
    IF [ #501 EQ 50. ] GOTO20 (2)
    IF [ #501 EQ 51. ] GOTO30 (3)
    GOTO1
    N10
    M95 (00:01)
    GOTO30
    N20
    G04 P5.
    N30
    M30

    %

  2. #2
    Join Date
    Mar 2005
    Posts
    1498
    060713-1132 EST USA

    axis overtravel:

    I have no idea what your M109 function does. Could you explain what its functionality is? I am not where a HAAS manual is at the moment, and I not aware that we have that function.

    Does
    M109 P501
    read the key code of a depressed key and put this in #501? Once initiated does it sit in the background updating #501 to the last key press? Is there a cancel function for M109?

    If
    #501 = 0
    then
    N5 IF [ #501 EQ 0. ] GOTO5
    will stay in its own continuous loop and reset will be required to terminate the loop. This would say N5 needs to be on the previous line. However, if in the background #501 is constantly updated to the last key press, then your code would work.

    It looks like 89 is the keyboard key code for key "Y", and 78 for "N". If this is the case your problem is probably related to the decimal points after these numbers in your IF statements.

    Change the IFs to
    IF [ #501 EQ 89 ] GOTO10 (Y)
    IF [ #501 EQ 78 ] GOTO20 (N)

    .

  3. #3
    Join Date
    Jul 2005
    Posts
    29

    M109

    Hi Gar

    thanks for your response.

    you pretty well have it figured. the macro option needs to be active to use M109, and it allows for the operator to key in responses, like y/n for yes or no etc.

    the code i posted i got directly from the Haas question man, but would not work when i tried it. i agree with you that the decimal points look a bit suspect, and i have questioned this with Haas. the reply i got today shows the decimal points, but i am told that the code was copied directly from the manual and works fine. the numbers 78 and 89 represent the ascii code for Y and N, and as such should not need the decimal points.

    i can find no reference at all to M109 in the manual i have, but on the Haas website, there is a G and M code card which shows M109 as an option, being used with a P word which collects the user input.

    i will try this code again as soon as i can get some time on the machine.

    thanks again

    axis

  4. #4
    Join Date
    Nov 2005
    Posts
    274

    M109

    Here is what the HAAS book has to say, I treid to upload the whole manual for you but it is to large. I have a couplr haas books if you want them send me a private message and I will try to e-mail them to yoy

    Bluesman
    Attached Files Attached Files

  5. #5
    Join Date
    Jul 2005
    Posts
    29

    m109

    thanks Bluesman

    that info helps some, as my manual has nothing about m109 at all.

    regards

    axis

  6. #6
    Join Date
    Mar 2005
    Posts
    1498
    060714-1139 est usa

    The HAAS description under M109 is as clear as mud as is the case for many HAAS descriptions.

    First off --- what year did this function become standard or optional?
    Second --- it does not clear up the issue of how the ASCII decimal value of a character is stored. I still guess it is without the decimal point. My guess also is that HAAS largely uses integer arithmetic. An input of 1. is probabbly internally stored as 10000 or 2710h.

    More later.

    .

  7. #7
    Join Date
    Jul 2005
    Posts
    29
    Quote Originally Posted by gar
    The HAAS description under M109 is as clear as mud as is the case for many HAAS descriptions..

    aha, at least you have a description, which is more than i have...

    i have 4 haas vertical machining centeres. the first 2 were purchased in 1998, with macro option as a cost option, the second 2 were purchased in 1999, with macro as standard.

    macro option enabled is required to use M109

    there is no mention of M109 in my manual, the m code list stops at M99

    i found out about M109 by emailing the Haas question man after i had the macro option installed on the 2 older machines. i asked if there is any way of getting a user input into the program at run-time.
    he sent me the code i posted earlier.

    i agree, the decimal points do look wrong with the ascii code, but the problem i have, is that when i tried this code in the machine, whatever key i pressed, the machine alarmed out with alarm 331. the manual explains error 331 as range error-number too large, which is not exactly helpful.

    to be honest, the way in which the control stores ascii number is academic...all i want to do is to put a prompt into the part program, and act on the response...[ this is real easy on Fadal and Siemens A2100 ]

    i have some time booked on one of the machines early next week, when i shall try this again...

    thanks for your help

    axis

  8. #8
    Join Date
    Mar 2005
    Posts
    1498
    060714-2017 EST USA

    axis overtravel:

    I will attempt some experiments tonight, no tomorrow, with M109. Our machines range from 1993 to 2000. All have macros. None of the manuals have M109.

    Before your post I never heard of the function.

    Why the internal operation of HAAS is not academic is that if you know or can guess how the machine may operate, then you can judge that something like 89. may be wrong.

    To troubleshoot your error problem one needs to find which instruction causes the error. Lookahead is always a problem to work around in this respect. At the moment I can not tell you if M00 blocks lookahead totally. A partial lookahead block follows: You can not use P0 for zero lookahead because this re-enables lookahead.

    G103 P1
    #5201 = #150 * 2.1
    #150 = #150 + 1
    G103

    the calculation #150 = #150 + 1 is not processed until after the #5201 line is done. I believe that the following would fail. I need to test this.

    #5201 = #150 * 2.1
    G103 P1
    #150 = #150 + 1
    G103

    Maybe "if" produces a range error because 89.0000 is larger than any value that HAAS expects or will allow in a variable.

    In your program if you tried the following you could spot the error point:

    N1 #501= 0.
    G103 P1
    G90 ( this just to perform a NOP operation )
    M109 P501
    G90
    N5 IF [ #501 EQ 0. ] GOTO5
    G90
    IF [ #501 EQ 89. ] GOTO10 (Y)
    G90
    IF [ #501 EQ 78. ] GOTO20 (N)
    G90
    GOTO1

    Obviously you then single step thru the program to see what happens.

    .

  9. #9
    Join Date
    Mar 2005
    Posts
    1498
    060715-0808 EST USA

    axis overtravel:

    I have only been able to try your code on our 1996 machine this morning.

    I get the same error message --- "range error".

    I believe the problem is a very STUPID error message. The message should read --- Function M109 does not exist.

    Upon removing the M109 P501 line and changing N1 #501 = 0. to #501 = 1 to get past your first IF I am able to run the program with no error message.

    Now if I put the M109 line back in and single step to the M109 line, then the error message pops up at the M109 line.

    Typical of HAAS support that they do not distinguish year of machine or version of software with functionality. It makes no sense to tell me something works when I do not have the function in my machine. It appears that M109 is not only a function of MACROS, but additionally important is year of manufacture,

    This is sort of like the discussion under "Automatic data entry into HAAS" where Haas Apps said the function existed, but did not initially say only in machines after 2001.

    .

  10. #10
    Join Date
    Mar 2005
    Posts
    1498
    060715-0952 EST USA

    The M109 instruction, if available and if it works, then may be used for some interesting applications.

    (1) For example operator entry of random labels and numbers to be engraved.

    (2)The Y - N means used when milling a bearing bore and multiple passes are made to converge on the desired value. This is possibly better than using single step, or M00.

    (3) Controlling DPRNT messages to be sent to a central data collection point. Maybe for timing information.

    What other suggestions are there?

    Note that using the ASCI character value instead of the key code means that the shift problem is automatically solved.

    .

  11. #11
    Join Date
    Aug 2005
    Posts
    413
    here is what my manual has on M109

    hope it helps

    JP
    Attached Thumbnails Attached Thumbnails m109pg1.jpg   m109pg2.jpg  

  12. #12
    Join Date
    Mar 2005
    Posts
    1498
    060715-1429 EST USA

    Anyone with a machine that has M109? If so, can you run the test program with the 89., and see if HAAS is really using 890000 as "Y", rather than 89 ? When did HAAS first provide M109 function?

    JPMach:
    A printout of m109pg1.jpg has the right edge lost. But has a moderately large left margin.

    .

  13. #13
    Join Date
    Mar 2005
    Posts
    1498
    060715-2017 EST USA

    axis overtravel:

    I have now tried the M106 function on our 2000 VF0. Same result range error, and program stops at the M106 line.

    I think it is clear that the function does not exist when you get this error.

    Since you had contacted HAAS and were clearly led to believe that the program was correct, and they apparently did not suggest that the function was none existent in your machine, then I consider their response irresponsible.

    It was like a time when I was troubleshooting a customer's machine relative to an RS232 problem. We were using software handshake and I call HAAS and ask if the hardware handshake signals were still active in this mode. That is the RTS CTS lines. I was told YES. I had RTS connected to CTS at HAAS so this should have provided the correct signals. But if there was a hardware failure on these lines it could cause the problem.

    I temporarily solved the intermittent problem by putting a big floor fan blowing directly into the electrical cabinet. So there was a thermal problem in HAAS. What was sensitive I do not know. The customer kept the fan in place until their business sent the machine to South America.

    When I got back home I tested at least one of our HAAS machines to see if RTS and CTS were active during data transfer (edit) when in XON/XOFF mode (end edit). Neither of these were active. That is good. But I could have saved a lot of time had I received a correct answer from HAAS about my question.

    In the case of your M106 problem we could have saved time if HAAS had given you a complete answer. On the other hand it is useful to know this function may exist on some machines. Now we need a date and version number to know when M106 started.

    .

  14. #14
    Join Date
    Mar 2005
    Posts
    1498
    060718-0813 EST USA

    axis overtravel:

    We have not heard back from you.

    Is our conclusion that M106 does not exist in your machine correspond with what you see?

    .

  15. #15
    Join Date
    Jul 2005
    Posts
    29

    m109

    hi Gar :wave:

    everything is in abeyance here as the machine i had booked for today has broken down, and haas uk won't get someone here before friday, so i have been unable to experiment...

    however, following is the last reply i had from haas USA re the existance of m109 [ i particularly like the last statement, so much so that i have highlighted it in red. i have to assume that 14.00A refers to the software version, as this is not explained. ]





    M109 is a standard feature, requires Macro to be enabled for user interactive.

    11.20 M109 INTERACTIVE USER INPUT added (1504)
    This is a new M code that allows a G-code program to place a short prompt on the screen, get a single character input from the user and store it in a macro variable. The first 15 characters from the comment following the M109 will be displayed as a prompt in the lower left corner of the screen. A macro variable in the range 500 through 599 must be specified by a P code. Note also that due to the look-ahead feature, it is necessary to include a loop in the program following the M109 to check for a non-zero response before continuing. The program can check for any character that can be entered from the keyboard by comparing with the decimal equivalent of the ASCII character.
    Here are a few common characters:
    A - 65 a - 97
    B - 66 b - 98
    C - 67 c - 99
    N - 78 n - 110
    Y - 89 y - 121
    0 - 48 + - 43
    1 - 49 - 45
    2 - 50 * 42
    3 - 51 / 47

    14.00A M109 problem corrected
    A problem was introduced into version 14.00 such that the M109 command would ignore user input. This has been corrected.


    i guess the next thing is to see what software version we have here...

    i have also contacted haas uk, and their applications engineer will look into the problem. they have confirmed that m109 is part of the macro option

    i will post more information as and when i can

    regards

    axis

  16. #16
    Join Date
    Jul 2005
    Posts
    29

    m109

    Hi All

    tried again today to fix this. it just does not work for me at all, despite what the haasman says.
    so i wondered about the software version, and contacted haas about it.
    [i have version 9.62n]

    problem solved. M109 becomes active with software version 11.20

    why the ******* **** couldn't haas [(nuts)] have made that plain in the first place?? i would have thought that piece of information was quite vital.

    so now we all know...

    atb

    axis

  17. #17
    Join Date
    Mar 2005
    Posts
    1498
    060731-1550 EST USA

    axis overtravel:

    This is the result of loose talk, inadequate definitions, or scope which seems to be quite prevalent. There is no excuse for HAAS to provide incomplete or inaccurate information.

    HAAS needs a data base, probably in the form of a spreadsheet, that defines when various functions and other items were added that users as well as HAAS support could reference.

    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •