Wrapper Error

Hi,

For some days I have been struggling with the Wrapper that I downloaded form Visual Components.

I am using KUKA SIM PRO 3.1.2.

I changed the height, width and length of the wrapper conveyor but for some reason the program does not allow me to change the Foil Angle and Foil Length.

Basically, when the pallet reaches the wrapper, it starts wrapping the pallet around with foil but after the first movement of the Servo Controller it gives me an error:

Traceback (most recent call last):
  File "TurnUnit #2::PythonScript", line 37, in OnRun
  File "TurnUnit #2::PythonScript", line 61, in createFoilSegment
IndexError: list index out of range

Here is the layout I have:

Best Regards

1 Like

Please share the stretch wrapper component you are using. The one from VC 4.3 eCatalog works fine and tested in KS 4.0.

I would assume this is related to this post as well.

Hi @WilliamSmith

Thank you for your answer.

Here is the wrapper component:
wrapper.vcm (16.2 KB)

Perhaps this can be fixed in the Python Script or not?

Best Regards

Very old component from previous VC product family.

I recommend you do the following:

  1. Clear 3D world.
  2. Load the wrapper component
  3. Notice the error in the Output panel. Fix this by adding AmountOfFeet property in component of type integer and set the value to 2 or 4, for example, so the wrapper is not suspended in mid error.
  4. Save with new VCID so it is saved with VCMX file format.

After doing that, the script in the wrapper is expecting the ComponentSignal to have a value, which it assigns to pallet variable. The pallet variable is then added as argument for calling createFoilSegment().

The createFoilSegment expects the pallet to be a component and that it is a container type behavior, e.g. Component Container behavior. If the pallet is None, you will get an error. If there is no container type behavior, you will get an error.

Long story short, it is an old component, so you can try to fix the script or update the component. No guarantee a VCM file will work properly in later versions of software. And you might get error that foil variable is none.

Consider getting new version of wrapper component or make a new one.

1 Like

Hi @WilliamSmith,

Thank you very much for you cooperation and detailed explanation about the approach.

I managed to make the wrapper work and it works flawlessly, except that I am not able to change the Foil Angle and Foil Length. When I try to change the number in either of the properties it simply shows the default value of the property.

The procedure for fixing was the following - I added a NumberOfFeet property with number of 2 and saved the file as VCMX and the mid error disappeared.

Then I opened the pallet component that I have in the Component Creator object and I added a Component Container at the Base of the pallet as well as a Component Signal which I connected to the Component Container.

In the end the wrapper started to behave as expected.

Best Regards

Check the ConfigScript in the component. Whenever the simulation or scene is updated, the FoilAngle and FoilLength property values are set by the script. So when you type in a value for FoilAngle, that change in value, triggers a simulation update, e.g. OnSimulationUpdate.

1 Like