Is it possible to add a for loop to a robot program

Recently when I am using Robot Programming, I found that it seems that there is no For loop function inside the robot program, which makes me a bit annoyed, is there any way to customise the For loop function?

what is your target?

Hello, captain_feature,
In fact my problem comes from when I use it, because when I use Python to do too much control, it may cause the simulation environment to lag, and there are times when I may use Program or Process to do the control, and the problem arises when I use both of them.
Similarly I sometimes need to do a loop of times in Python he just needs to be similar:

for i in range(10):

But I don’t see a For loop in Program and Process, which leaves me doing something like using two properties, one with the current value and one with the target value, and then using something like:

while Current_Value <= Target_Value:

In fact, it works fine, but sometimes I don’t want to set too many properties, and whenever I have that thought, I wonder why Visual Components doesn’t provide For loops for both modules, which is why I’m asking this question today. :melting_face:


because it don’t exists! :wink:
What you’re doing looks fine!
I recommend you log an official extension wish…


1 Like