Painting line simulation


Noob here :smiley:

I am making a painting line simulation and i have 9 different products that would have to be put on a hanger and ran through the painting line and removed off of the hanger. All the products have different times in various places on the painting line. There is one especially problematic section that is the oven. The oven has 2 lines that both have a capacity 3 hangers per line. The oven process starts when the hanger enters the oven and stops at the exit. I would want to start a counter when the product enters the oven area and deduct that time from a process point when the product enters it. Is this even possible without a pythoin script? Other thing is that how can i create the variable process times for each product in the other process points in the system? process points include things like covering and washing.

Hi @Icebearer

If you use Process Modeling you could probably do these without coding.

There are statements that can be used to control the material flow and to trigger logic based on certain conditions.

Below is a screenshot of two example processes I made.

One has a Switch statement that checks the product type name and based on the name, there are different processing times.
Another process has a counter that starts when a part enters, and then after the counter meets the condition, the part is transported to the next station.

Thank you this helped on the first part of my problem :smiley:

Can i use the counter part so that the counter would start when my part enters the oven in one point and the part exits when the counters reaches a set value in a different place? Preferably so that the part could move along the conveyor while the counter ticks on. And can i combine the switch statement to it so that the counter would count different counts for different parts simultaneously?

You could use a product property (defined in the product type) either as a counter, or to store simulation time as a timestamp (seconds from simulation start) and calculate remaining time in expressions by comparing to current time.

The current simulation time in seconds can be accessed using SimTime() function in expressions.

Sorry for no response and being a noob… How could i make this happen? As i said above i have 9 different products in total i would have to define the product properties for each one since the curing time of the paint is dependant on the product in question yes?

  1. Add a “CuringStartTime” product property to each of the product types
  2. When the product has been painted, use the Assign statement to set e.g. Assign "ProductIn.CuringStartTime = SimTime()"
  3. In subsequent processes check whether approriate amount of time has passed for specific product instance e.g. If "ProductIn.CuringStartTime + 60 >= SimTime()"

In addition, you can replace the constant curing time of 60 seconds with Product type or Product instance specific time by adding another property for it and use that in the expression.

Thank you for your help :slight_smile:

It gives me the following error. I made a process point to assign the value but it seems VC cant find the property for whatever reason.

::Timestamp:::SetPropertyStatement: Unable to assign value to "ProductIn.CuringStartTime; the property does not exist

If you have set up the Product property correctly in the Product type, there might be a bug in the Assign statement :frowning:
You could try with a Component property instead. Then the expression needs to be like ProductIn.Component.CuringStartTime = SimTime()

Im pretty sure its an issue with my setup of the product property…

What should the correct property type be? Iam curently using double but i tested string also and it didnt work. Also should i put the SimtTime() function into the product property or the assign process node or both?

Here is the set up that im running (not working)



If i hover my mouse over the ValueExpression in the assign statement it says “Result: cannot determine value”

By the way im on V.C 4.6 premium

You are using ProductIn.CuringStartTime in one and ProductIn.Component.CuringStartTime in another?

The property should be of type Real (aka. “Double”) as that is what the SimTime() returns as well.

If i hover my mouse over the ValueExpression in the assign statement it says “Result: cannot determine value”

This is normal as the expressions in PM processes can’t know the variables created at runtime.

Okay so i made a print statement aftter the assign statement Print: ProductIn.CuringStartTime and it gives me the correct value for the timestamp so that leads me to believe that the assign value works as wanted. The only weird thing is that it prints 2-3 values that are close to eachother but i dont necessarily think this is an issue.
The only remaining problem i seem to have is that i cant get the products to leave the oven when the timer reaches the wanted value. I tried to make a while statement to hold the product and release it when the timer reaches the wanted value but VC just delays infinetly and does not release the product.

Edit: I also made a print statement to the release phase and it gives me the same value that the product had previously so the timestamping works.

Ok i got it to work properly.

Huge thank you to you both who helped i dont think i would have gotten this done without you :slight_smile:

1 Like