Configuring PLC within PLC-object
How to configure the →PLC resp. how to define which PLC should be used when loading your application:
Open a PLC-object.
In the opened editor for the PLC-object, search for the lines starting with CHANNEL and ending with END_CHANNEL:
Syntax in case of communication with target system via TCP/IP{
CHANNEL channel-name
TCP
ADDRESS := address;
PORT := 1534;
END_TCP
END_CHANNEL
}
Example for definitions in PLC-object{
CHANNEL LocalChannel
TCP
ADDRESS := 127.0.0.1;
PORT := 1534;
END_TCP
END_CHANNEL
}
After you have created a project, usually there are already some settings specified for the PLC within the existing PLC-object (information about the possible definitions are listed under "Errors while editing PLC-object in editor, Correct syntax for PLC-object").
Replace the definition for the IP-address by the corresponding data for your PLC.
Search for the following line in the editor:
SyntaxRESOURCE resource-name ON platform-name { ON_CHANNEL := channel-name }
Example for definitions in PLC-objectRESOURCE local ON BuiltInPlc { ON_CHANNEL := LocalChannel }
Make sure that in this line behind ON_CHANNEL the same name is entered as entered in CHANNEL ... END_CHANNEL.
When loading the application for the example, the PLC under IP-address 127.0.0.1 is addressed.If no platform is entered in the PLC-object, select one by using the content assist (in line RESOURCE ... behind ON). All available platforms are listed under "Available platforms".
Save the PLC-object: menu file – Save
Available platforms
At present, the following platforms are available:
Platform |
Use this platform, if you want to load the application on the following PLC. |
entered within this existing PLC-object |
BuiltInPlc |
on the local computer |
within local, if the project has been created by using a general project template |
LinuxX86 |
on a Linux PC |
– |
WindowsX86 |
on a Windows PC |
– |
More platforms might be provided in your version.
For instance, the following platforms are provided for the respective target system :
Platform |
Use this platform, if you want to load the application on the following PLC. |
entered within this existing PLC-object |
ArduinoNanoV3 |
on an →Arduino Nano |
within arduinoNanoV3, if the project has been created by using a project template for Arduino Nano |
ControllinoMINI, |
on a respective →Controllino |
within controllinoMini, controllinoMaxi, controllinoMega or controllinoMaxiAutomation, if the project has been created by using the respective project template for Controllino |
RevolutionPi |
on a →Revolution Pi |
within RevolutionPi, if the project has been created by using a project template for Revolution Pi |
phyboardRegor |
on a →phyBOARD-Regor |
within phyBoardRegor, if the project has been created by using a project template for phyBOARD-Regor |
phyboardWega |
on a →phyBOARD-Wega |
within phyBoardWega, if the project has been created by using a project template for phyBOARD-Wega |
Raspbian |
on a →Raspberry Pi |
within raspberry, if the project has been created by using a project template for Raspberry Pi |
Several PLC-configurations to quickly change the PLC-configuration
If you want to quickly address a different PLC when loading, you might want to consider providing several PLC-configurations.