De configuratie die u in de Project Builder handmatig uitvoert, kunt u in plaats hiervan ook uit een XML-bestand importeren. Hierdoor verloopt het configuratieproces sneller.
Het XML-bestand moet bepaalde structuurelementen bevatten, zodat het kan worden geïmporteerd.
Basis-structuurelementen | Betekenis |
---|---|
|
Geeft het XML-bestand als configuratiebestand aan. Alle gegevens moeten zich binnen dit structuurelement bevinden. |
|
Geeft het blok aan, dat de gegevens over alle configuratievariabelen bevat. |
|
Bevat de waarde voor een bepaalde configuratievariabele. Als naam moet de exacte code van de configuratievariabele worden ingevoerd. |
Structuurelementen voor instanties | Betekenis |
---|---|
|
Geeft het blok aan, dat de gegevens over alle instanties van één te configureren element bevat. Als naam moet de exacte code van het te configureren element worden ingevoerd. |
|
Geeft het blok aan, dat de gegevens over alle configuratievariabelen van één instantie bevat. |
Hier ziet u de opbouw van het XML-bestand die u voor de configuratie van de configurator 'Generate sample project with variants' uit de bibliotheek 'ESS_Sample_Macros' kunt gebruiken:
<Configuration typical="XML_IMPORT">
<ConfigurationVariables>
<ConfigurationVariable name="OP_Measuring_Transformer">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Light_power">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Receptacles_power">2</ConfigurationVariable>
<ConfigurationVariable name="SE_Light_control">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Receptacles_control">2</ConfigurationVariable>
<ConfigurationVariable name="OP_Control_panel">false</ConfigurationVariable>
<ConfigurationVariable name="OP_Panel_Enclosure">true</ConfigurationVariable>
<ConfigurationVariable name="OP_Panel_Control">false</ConfigurationVariable>
<ConfigurationVariable name="SE_Drive_Transport">Frequency Control</ConfigurationVariable>
<ConfigurationVariable name="SE_Method">Electric</ConfigurationVariable>
</ConfigurationVariables>
</Configuration>
Voorbeeld: Structuur van een XML-bestand voor de configuratie van instanties
Hier ziet u de opbouw van een XML-bestand die u voor de configuratie van instanties moet volgen:
<Configuration typical="XML_IMPORT">
<TypicalInstance name="Conveyor" >
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 1</ConfigurationVariable>
<ConfigurationVariable name="parameter2">1234</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 2</ConfigurationVariable>
<ConfigurationVariable name="parameter2">5678</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 3</ConfigurationVariable>
<ConfigurationVariable name="parameter2">9012</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 4</ConfigurationVariable>
<ConfigurationVariable name="parameter2">3456</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
</TypicalInstance>
<TypicalInstance name="Enclosure" >
...
</TypicalInstance>
</Configuration>
Voorwaarden
- U hebt het dialoogvenster Project Builder opgeroepen en een bibliotheek geopend die de configurator bevat die u wilt configureren.
- U hebt een doelproject geselecteerd en de configurator geopend.
- U hebt het element van de configurator geselecteerd waarin u een configuratie wilt importeren.
XML-bestand importeren
- Klik op de knop Importeren naast de weergave van het doelproject.
- Het systeemdialoogvenster Bestand openen verschijnt.
- Selecteer het XML-bestand dat de configuratie voor het element bevat dat u in de Project Builder hebt geopend. Klik op vervolgens op Openen.
- De configurator wordt met de gegevens uit het XML-bestand uitgebreid. U hoeft de afzonderlijke waarden niet meer handmatig te selecteren.
Opmerkingen
- Gegevens over code, type en waarde van een configuratievariabele in het XML-bestand moeten precies passen bij de elementen in de configurator. Als de gegevens niet overeenstemmen, krijgt u een foutmelding over de betreffende variabelen en wordt de import afgebroken.
- De XML-import is beschikbaar vanaf modulepakket Advanced.