RobotStudio event

Changing Smart Component Properties from RAPID


I'm just starting out with using Smart Components in RS, and I have a question I haven't been able to find an answer to on the forum and using google. Say I create a
parametric cylinder" smart component. It has a property called "height". How would I go about changing this property from within a RAPID code? Can I access it as a variable somehow? I haven't found a way to do it directly, but I did notice a "converter" smart component, so what I attempted to do is set up an analog signal called "height" which links to the analog input of the converter, which links to the "height" property of the parametric cylinder. The problem is that from within RAPID it seems like you can only set values of analog outputs, not inputs, so I'm stuck. Any help/references would be greatly appreciated!

EDIT:
So I think I figured out the next step - I made a new analog output in the controller setup and linked it to the analog input of the converter smart component via the station logic menu. Now the problem is, when I update the value of the new analog output within a RAPID code, the analog output variable  changes when I go to Controller -> Inputs/Outputs, but the analog input in the smart components to which it is now linked does not update! It stays at the default value, no matter what the corresponding digital output's value is.
robots4life2013-02-04 21:27:57

Comments

  • Hi,
    To connect an Analog Output or a Group Output from a Virtual Controller to a Smart Components Analog or Group Input should work. 
    Have you setup an I/O connection between the VC and the Smart Component in Station Logic?
    Best regards,
    Anders Spaak
    ABB Robotics
  • Hello,
    Yes, I set up the connection in the Station Logic menu. Does running the tasks from within the RAPID tab (right click on a task, click "start task") not use the I/O signals the same way as running the program from the Simulation tab? I'm trying to run just one secondary task which moves the smart component, so I'm not running the entire simulation, just that one task.


  • To be sure that the Smart Components are updated correct the simulation should be running. If you want to run the RAPID code from the editor you should uncheck the robot in "Setup Simulation" before you start the simulation.
    image image
    Best regards,
    Anders Spaak
    ABB Robotics
  • I see - thanks for your help!

  • I think I have the same problem with RS 6.05, I can't update more than two analogs together (from RAPID to SC)  The Station logic only update the lowest signal connected (graphicaly), if I remove it, the upper one will work again.
    No problem with Digital Signals
    Do you solved your problem?

     
  • I think I have the same problem with RS 6.05, I can't update more than two analogs together (from RAPID to SC)  The Station logic only update the lowest signal connected (graphicaly), if I remove it, the upper one will work again.
    No problem with Digital Signals
    Do you solved your problem?