RobotStudio event

Manipulate Robot inputs by VBA

There is any way to change a Input State via VBA macro?


  • Maybe you may use the following VBA object:

    ActiveStation.Mechanisms("Robot Name").Controller.IOs("inputName")

    Where Robot Name and inputName are the actual names of the robot you are using and the io you want to change.

    Hope this helps.


    Victor - En essayant!!
  • By this way, I have checked that it is possible to write a output, but not an input....

    my code is:

    'To find a Output in a controller:

    For Each Aux_Out In ActiveStation.ActiveMechanism.Controller.IOs

       If Aux_Out.Name = "aux" Then Exit For

       End If

    Next Aux_Out


    'To set the value of the output

    AuxOut.Value = True


    AuxOut.value = False

    I have found that this don't work for an input.

    The compromise-solution I reached was to write a output and made a croos-connection via "Event table" with the input.

    Otra cosa vleon, soy espa?ol, y si no se me entiende en mi arcaico ing?s, te lo cuento en castellano ;-).


  • Jaja, se entiende perfectamente.

    Creo que sabes bastante m?s de VBA que yo... lo que es normal pq yo no s? na de na, casi (solo la poca cosa necesaria para manejar algo de entradas, mecanismos y demas)

    La verdad es que no prob? con inputs... pero curiosamente tampoco puedo cambiar inputs con el programmaker... e hice lo mismo que tu, via eventtable ;)

    Hehe, ok, i think the eventtable solution is perfect, unless you are running out of io's.... ;)



    Victor - En essayant!!