No announcement yet.

Variabel, names and _ approved character in variables? For example, LM_H1...

  • Filter
  • Time
  • Show
Clear All
new posts

  • Variabel, names and _ approved character in variables? For example, LM_H1...

    Tried to calculate an value with another variable but it doesn´t work.

    This I my variables list,

    Variable, content, comment
    DINR , 1 , 1=Right
    LM_H1, 145, Position #1
    LM_H2, 1670, Position #2
    DM_H1, IF LM_H1>10 THEN -1.5 ELSE -1.0 , Calculation of depth

    The calculation of DM_H1 fails as Woodwop is saying that LM_H1 is not a correct variable. I tried to set DM_H1=DINR, and that worked.
    I`m thinking that Woodwop seems having problem with the sign "_" when making calculations?

    Any other with same experience or maybe an solution for me?
    Will test without "_" and see what happends...didn't have time as I stood by the machine.

    Also tried the variable on condition on upg program but the same problem...something with the variable.
    Last edited by Rob; 29-05-18, 20:30.

  • #2

    Of course you can use the "_" line, but not the first one beacause then it's a global variable. I think your problem is because of that line line you've got two or more "_" lines licked and the name of the variable is not the same.

    You can easily find out when you place a variable in the desired field by right-clicking on the mouse and adding a variable from the drop-down list. Doing so by making a variable name can not be a mistake



    • Rob
      Rob commented
      Editing a comment
      Thank you.
      Tried it out but it might be so that variables with "_" is global. I read in the help section that global is recommended to begin with "_" to order your global variables in the beginning. Just as recommendation....not shall begin with.

      Right click didn´t work, but I found that if I press shift+space then I get the list with variables.
      I created an variable without "_" and made an if statement with LM_H1...that worked.

  • #3
    I just tried your variables in ww7.1 with no issues. check for a missing or added space in your IF/THEN/ELSE statement?


    • Rob
      Rob commented
      Editing a comment
      Ok, thank you!
      This is an Torwegge SBL and I know that there are many changes for an SBL vs CNC within WW.
      Update to new version isn´t probably possible since there are to many changes in WW for SBL-machines.