DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
BBell

Attached below is some of the code, I left out the "Switch boardType" as it was long and contained positions for variables. Specifically, I encounter the double pop up problem when the user needs to chose the type of board and the desired function.
The program is supposed to trigger an error if the boardType number is not between 1 and 4 - which it does but only on the first pop up. I can enter any number on the second pop up.
For the boolean questions, i have found that when it asks for the retorque, regardless of if I choose "yes" or "no" it asks if I want to install screws. Instead, it should perform the retorque protocols. 

Loop verifyAll≟ False 
       Select Board Type
         Loop checkBoard≟ False 
           boardType≔'Please select a board type:'
           'If board type chosen is valid, the screw location of the board type will be assigned in the switch function.'
           If (boardType≤4) and (boardType≥1)
             'Each case has the same structure but the screw location is different.'
             Switch boardType 'Within the switch, numerous positions are assigned to other variables, these are left out for ease of reading'
           Else
             Popup
         checkBoard≔ False
      Choose Screw Action
         'This will ask the user to determine the desired function'
         retorque≔'Is this a post-lam retorque?'
         If retorque≟ True 
           Set Switch_Program=On
           screwTypeStr≔"POST-LAM RETORQUE for"
         Else
           Set Switch_Program=Off
           tightening≔'Are you installing screws?'
           If tightening≟ True 
             screwTypeStr≔"INSTALL SCREW to"
           Else
             screwTypeStr≔"REMOVE SCREWS from"
       Enter Number of Boards
         'This will ask the user to determine the number of boards.'
         numBoards≔'Enter the number of boards.'
         Loop (numBoards>10) or (numBoards<1)
           'This loop will ensure that the user input is between 1 and 10'
           Popup
           numBoards≔'Enter the number of boards.'
         numBoardsStr≔to_str(numBoards)


Let me know if you have any other questions.