Nirtec Studio Forum

General Category => Machines Simulator => Topic started by: German_44 on March 30, 2010, 09:08:47 AM

Title: WorkPart Creator
Post by: German_44 on March 30, 2010, 09:08:47 AM
Is possible to use a input to create a workpart with the WorkPart creator. In the properties of the component I only see a PLC output to create new workparts.
I mean, for example, when a inductive switch is detecting a workpart I want that the workpart creator creates a new workpart.
Is this possible?
Title: Re: WorkPart Creator
Post by: EasyPLC_Master on March 30, 2010, 09:47:32 AM
In the 1.3.0 version is possible to select a PLC Input or PLC Output to create new WorkParts, then for your case you could select the inductive switch PLC Input as trigger to create new WorkParts.
In previous versions you need to use code, if your WorkPart Creator component uses the PLC Output number 10 and the inductive switch uses the PLC Input number 1 you can write this code in the Main procedure of your installation code property:

public void Main(GameTime gameTime)
{

   IOManager.SetOutput(10, IO.GetInput(1));
}

With this code the PLC Output number 10 will have the same status that PLC Input number 1.