Eplan Platform API
Eplan.EplApi.DataModel.Planning Namespace / PlanningSegment Class / AddPLCAddress Method / AddPLCAddress() Method
Example

In This Topic
    AddPLCAddress() Method
    In This Topic
    Creates new PLC inputs or outputs for this planning object.
    Syntax
    public PlanningSegment.PLCAddress AddPLCAddress()
    public:
    PlanningSegment.PLCAddress^ AddPLCAddress(); 

    Return Value

    Returns created element.
    Remarks
    New element is appended to the end of the PLCAddresses. All fields of new object are set to default values.
    Example
    The following code adds new PLCAddress to planning object.
    //create new planning object
    PlanningSegment oNewPCTLoop = PlanningSegment.Create(oSegmentDefinition);
    
    //add new PLC address
    PlanningSegment.PLCAddress oNewAddress = oNewPCTLoop.AddPLCAddress();
    
    //set values
    oNewAddress.Direction = PlanningSegment.PLCAddress.Enums.PlcAddressDirection.Input;
    oNewAddress.Address = "A2.0";
    oNewAddress.DataType = "WORD";
    oNewAddress.SymbolicAddress = "=EB3+ET1-H2:X1";
    oNewAddress.Configuration = "Siemens SIMATIC S7";
    oNewAddress.Station = "Station 300";
    
    
    See Also