Home Programming

Discussion

Left ArrowBack to discussions page
CedricundertCedricundert Posts: 7 Apprentice
I'm currently working as an intern, tasked with the job to write programs that are easy to use for operators without a lot of  expierience at programming at all. the robot will be used for palletizing Sheet metal parts from a conveyor belt to a pallet. The position of the pallet is being defined every time the program is started, since there are no defined positions in the cell. Up until now the pallet was always defined through the same corner, but to make the job easier for the operator, I want a multiple choice option where the operator can decide from which corner they want to define the pallets position. Certainly there are other ways to input from which corner the pallet is being defined, though I think this would be the most elegant. 

Best Answer

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,249 Handy
    Accepted Answer
    There’s no super elegant solution but you can do this through an assignment. You can change the assignment type to operator, on a CB3 it’s up in the upper right corner of the assignment node, may be same position on e-series. 

    You can define this assignment type as a string and then ask the operator to enter “l” or “r” or “L” or “R”. Place it inside a loop so you can test the response to make sure it’s a valid response. If it’s valid you can now take action on it. 

    We do this a lot with startup options but we use integers as we can then use the variable directly in switch statements without the need to assign the string into an integer. 

    For instance in the text box we’ll say something like “Press 0 to reset cell, 1 to continue from last operation, 2 to skip to next step”

Comments

  • CedricundertCedricundert Posts: 7 Apprentice
    Thanks for the Answer, I already use this kind of Code for Operator Inputs already, just without the if statements. Thanks for responding this quick and with a great example! 
Sign In or Register to comment.
Left ArrowBack to discussions page