PG2: dynamic display different graphicelements from controlmoduletyp1 on graphicelement from controlemoduletyp2
A few instances of the controlmodultype "Vehicle" drive on a fix track. The track exist from many instances of the controlmodultype "TrackPart". The trackpart instance knows the vehicle instance, which is on the part.
Each trackpart instance has a graphicelement, which shows the trackpart.
How can I display a graphicelement of a vehicle instance on the current trackpart?
Is it possible dynamic display a graphicelement of different vehicles on a graphicelement of trackpart?
> "Is it possible dynamic display a graphic element of different vehicles on a graphicelement of trackpart?"
Yes, and there are several ways that you could do this. Which method you use really depend on whether you want to "re-use" the solution or not.
It sounds like the solution for you, is to include all the possible vehicles in the base graphic element. Then set the "Visible" property of each vehicle so that only one vehicle can be seen at a time. The Visible property could be set by a variable from the PLC ( the vehicle instance perhaps) or by adding a property to the graphic element that you can set when building the graphic. At run time, only one vehicle type is visible.
How can I include all vehicles instances on the trackpart controlmodultyp, if the vehicle controlmodultyp is outside of the trackpart controlmodultyp?
the number of vehicles are a lot (around 100). One idea is, the trackpart instance has a ID to a vehicle, which is on the trackpart. With this ID, I want display the graphicelement of the vehicle on the graphicelement of the trackpart.
But I'm afraid, it's not possible in a controlmodul instance to point to an other controlmodul instance of an other typ and display them.