Indexing throughout part

EskatsarosEskatsaros new castle, PA
Hello All,

I was trying to add an index that the operator can initially input (or I can make multiple point and call on those points) throughout our part.

So I can either add a start and finish point, then have the operator add an index, which I would rather do (or even have it as a set index and be able to change it if need be)...
Or I can add multiple points and call on those points.

I also need it to repeat "x" amount of passes.

Anyone know a quick/easy way to do this?
Appreciate any support.



  • lemster68lemster68 United States ✭✭✭
    I don't understand what you are asking.  Please elaborate more what you mean by "index"?
    Lee Justice
  • EskatsarosEskatsaros new castle, PA
    We have some flat stock we need to coat. My start point is the upper, outer edge and I need to go 12 inches across, index down 0.5 inches, go in the reverse direction (which would be 0.5 inches below pStart)...go down 0.5 inches....until the whole thing is coated (say 6" height).

    Also, we need to measure thickness after 2 passes - so instead of running it twice (and wasting spray product) I would like to add an option to put in 2 passes (or more) to make it easier for the operator. I can simply redo all the point in the program but just curious on how to do that.
  • lemster68lemster68 United States ✭✭✭
    First, use offsets.  You should be able to do the math for how many times you need to index by the height.  Second, here is a snippet of how we allow operators to choose the number of passes and change if necessary.

    You could also consider using an array of robtargets to do your offests/indexing.

            ! allow operator to change the number of coating cycles from the default value
            defaultValueString := "default value = " + NumtoStr(coatingCycleCounter,0);
            coatingCycleCounter := UINumEntry (\Header:="Change Coating Cycles", \MsgArray:=["How many coating cycles?", defaultValueString], \InitValue:=coatingCycleCounter, \MinValue:=coatingCycleCounter-5, \MaxValue:=coatingCycleCounter+5, \AsInteger);

    Then you put your motions inside a WHILE coatingcyclecounter > 0 DO
                                                                 Do your thing here...
                                                                 Decr coatingcyclecounter
    Lee Justice
  • EskatsarosEskatsaros new castle, PA

    Thank you for the help.

    I plugged in the info you used with the variables I had already set up in my current program:

    PERS num regPassCount:=4;

        list1{1}:=["","Number of Layers=    "+NumToStr(NUM_LAYERS,0)];

     1   MoveL p5a_h, v300, z50, tGripper;
     2   MoveL Offs(p6_h,350,0,0), v300, z50, tGripper;
     3   ! allow operator to change the number of coating cycles from the default value
     4   numToStr(NUM_LAYERS) = "NUM_LAYERS = " + NumtoStr(regPassCount,0);
     5   regPassCount := UINumEntry (\Header:="Number of Layers",\MsgArray:=["How many coating         cycles?"],\InitValue:=NUM_LAYERS,\MinValue:=NUM_LAYERS0,\MaxValue:=NUM_LAYERS+10,\AsInteger);
     6   WHILE regPassCount > 0 DO
     7   MoveL pHutchStartPoint, v10, z50, tGripper;
     8   MoveL pHutchEndPoint, v10, z50, tGripper;  
     9   Decr regPassCount;
     10 ENDWHILE

    The first portion being data, 2nd portion being part of a list the operator can adjust prior to coating/running the program, and the 3rd portion being the info I plugged in per your example.
    Tried putting that in and it came up with a syntax error and didn't like the "numtostr" portion in line 4. Tried to mess with it a little but ran out of time.
    I'll admit that I'm not very fluent in this yet - still some training to attend, but any advice would be greatly appreciated. 
  • EskatsarosEskatsaros new castle, PA
    I can easily put in robtargets to get rid of this headache but now I'm curious and, speaking with the operator, he would prefer to have the option on there as that is what he is used to.
  • lemster68lemster68 United States ✭✭✭
    First problem, maybe here you just left out the colon while typing here.

    4   numToStr(NUM_LAYERS) = "NUM_LAYERS = " + NumtoStr(regPassCount,0);
                  colon here                /\

    Next, one would usually do:

    VAR string MySTring;

    MyString:= NumToStr(NUM_LAYERS);

    And I am still trying to decipher what exactly you are trying to accomplish with that line of code.
    Lee Justice
  • EskatsarosEskatsaros new castle, PA
    When they run the program (everything armed and ready in auto), a menu comes up where you can put in the diameter of the part, overtravel distance of the gun off the part, any index you would like, and number of passes). Once all their data is in, they select an option "No further Changes", and the program starts.

    This section is to call on the number of passes they initially put in, repeat the pHutchStartPoint and pHutchEndPoint until the counter (or passes) reach zero.

    I tried the semicolon in there yesterday and it didn't work.

  • lemster68lemster68 United States ✭✭✭
    Colon, not semicolon.
    Lee Justice
Sign In or Register to comment.