C# Classes into PLCnext
Hello,
I have created some code which contains a class named "Tank".
The "Tank" class contains another class inside it as a variable which is named "Pipe" and contains 2 boolean variables (inputSwitch and outputSwitch).
How can I add the "Tank" class to my PLCnext Program Code and match the inputSwitch and outputSwitch of the "Pipe" class contained in it to actual I/O modules?
Any help is appreciated in advance!
Comments
Hello dimitrismvrm,
I hope I understand you use case correctly and would like to recommend follws:
If I don't understand you use case correctly, please provide me the Source code of your project. Please use the following contact (if your company located in germany): Kontakt | PHOENIX CONTACT
Automatisierung und Safety
Montag - Freitag: 08:00 - 16:00 Uhr
+49 5235 3-11000
support@phoenixcontact.de
BR Eduard
Well, my actual question is this. I have created a PLCnext C# Program which has some variables I want to connect to the actual Inputs and Outputs of my PLCnext device.
I want to match the followings:
_outputSwitch_Pipe1 to digital_output_1 of my PLCnext device
_outputSwitch_Pipe2 to digital_output_2 of my PLCnext device
_inputSwitch_Pipe1 to digital_input_1 of my PLCnext device
_inputSwitch_Pipe2 to digital_input_2 of my PLCnext device
How can I do that inside PLCnext Engineer?
Hello dimitrismvrm,
the LibraryBuilder automatically generates the ".pcwlx" library within the process of Visual Studio compilation. The file is located in your project folder, e.g. C:/Users/<username>/workspace/FirstProject/Bin.
You have to proceed the follwong steps:
I think, the descriptions will help, if not, please let me know.
BR Eduard
Alright I think that helped me a lot! Thank you Eduard! Step 4 was where I got confused.