RobotStudio event

Smart Component to Generate Colored Boxes

I am running into a problem with a smart component to generate boxes of a given size and random color. Attached is the smart component library. 
The boxes get generated as required but for some reason the color is not applied. The "highlighter" signal is shown as 1 for the new copy created by the "source". But it doesn't have any color. If I manually set the "activatecolor" signal for SC to 0 and then 1 again, it will have color. 

Anyone know why this is happening or at least a workaround. Thanks is advance!

Comments

  • No attachment!!!
    Per Svensson
    Robotics and Vision Specialist
    Consat Engineering
  • Take a look at this it may help you
    Per Svensson
    Robotics and Vision Specialist
    Consat Engineering
  • Oops. Here is the attachment. Will take a look at the file you sent in the meanwhile. Thanks
  • Got an idea from your smart component and with some tinkering, I manged to get it to work.
    Basically 3 changes were needed.
    1) I used a timer to activate the "highlighter" with an OR and NOT gate so that the signal always remains high.
    2) Unticked "transient" in the "source" component. Not sure why it works but if transient is selected, the new boxes don't have color.
    3) Run from simulation. If you start it from the virtual flexpendant, the timer in the smart component doesn't work and therefore, no color is applied.

    So right now my library can create a box of a given dimension (given from socket) dimension and place it at a given position(given from socket). The boxes will have random color.
  • Hello there,

    I'm currently also in need of a parametric box with assignable or randomly changing Color. I've had a look into your attachments and descriptions above but none of them worked for me. I am using RS 6.07.01, maybe this is a reason (post is from 2015..!?) Help appreciated.

  • wow great smart component. I need to know how to transfert from rapid to smart component. thank you