|
Post by Admin on Dec 6, 2022 11:30:24 GMT
An OOIO Demo can be downloaded from HERELogin and follow the instructions in the IO_MAP visualization and the AAA_README file. Note, due to a CODESYS bug, the first time you login, you will need to do a warm-reset.
|
|
|
Post by sturmghost on Apr 2, 2023 14:38:54 GMT
I'm impressed by your elegant solution. Nice! I'm new to SPS programming but I have some programming background on VBA, VB.NET, Arduino, Python and MatLab and want to learn how things are done. I looked into your demo in codesys but I'm unable to understand where in the code the mapping to the physical I/O at the controller happens. Maybe there is no I/O mapping to variables and you are directly accessing the physical I/O pins on the controller via code but where you do this - is it at the "ReadIOModule" and "WriteIOModule" Method? Say I have a SPS with digital input und output pins and I want to configure those pins through code not through the classical IDE I/O Mapping GUI. I think you are doing this but I can't find information's about this topic in the codesys documentation. Only the classic non OOP solutions. If my IDE mapping GUI looks like this: How can I access the digital input channels/addresses/pins through code? Maybe I'm getting something conceptional wrong here. In your video you are talking about the obsolet/old AT statement where you can map a variable to an address trough code. As you do not do this in your solution because it violates the OOP concept - how you do it then? I'm thinking a little bit like programming an Arduino where you could read a config file (like you do), populate an array or struct with the pin assignment for each object, looping through this array and do something like MyVar = digitalRead(PinAssignmentArray ).
Can you point me in the right direction?
|
|
|
Post by Admin on Apr 4, 2023 14:28:15 GMT
You can't reconfigure your I/O through code when using the CODESYS I/O tree. You can remap your I/O in code using Option 5 in the video. There is no demo of option 5. The demo only shows option 6 (which eliminates the CODESY I/O tree). In this demo, the I/O mapping is a parameter on the equipment object. For instance, see the RunCmd_FO_CI variable on the PumpFB. You can find the mapping in the IO_UserParameters.csv file in the project (which is downloaded to your application directory on your runtime file system). For more information, be sure to view this video if you haven't already: ooip-foundation.proboards.com/thread/7/ooip-video-demo-projectNote, that the OOIO library could be modified to place the I/O mapping in the I/O Supplier (in TypicalAnalogIO_Module, for instance). Some engineers like their plant equipment to specify the I/O it needs, and some like that all done in the I/O module instances. I hope this answers your questions.
|
|