Post by m83coding on Raspberry Pi Codesys SPI Master
CODESYS Forge
talk
(Post)
Hello, I am trying to control shift registers 74HC596 and 74HC165 via Raspberry PI with SPI interface. So far I did it with a Microcontroller and now I wanna upgrade my Projekt with Raspberry Pi and Codesys Software to be more flexible. I tried to adapt PiFace Function Block to just send or recive a 8 bit via SPI interface of the my Raspberry Pi. With following code (see attached screenshots) * PLC_PRG * PiFaceDigital * PiFaceDigital.write8 * PiFaceDigital.read8 I have a signal at SCK and MOSI pin of the PI, so far so good. But I really struggle with the unterstanding of the code. Is there some detailed description of each line of code? Or is there somebody in the community who can explain each line of code? Or is there a more simple way to send / recive 8 bit via SPI? Manuel
Last updated: 2024-04-23
Post by reinier-geers on License problem gateway
CODESYS Forge
talk
(Post)
Epis doesnt want Softmotion. I thought it was about the price. If it was possible it would be working already and i dont need an extra licence. Thats the problem of codesys. The software is running but hangs on its license. Epis made it posible to see the stick. I can see the license. Softmotion is there from 3.5.14.Xx Like is said And Motion control is alrady posible 15 year ago. And i only need a Sync of 2 drives. I want a good solution not a refund. Dont point to the manufacturer. The software is made by 3s not by epis .
Last updated: 2024-04-29
Post by fpawlak on KNX SL on stock PFC200 firmware
CODESYS Forge
talk
(Post)
Hi All. Is it possible to use CODESYS KNX SL on stock Wago firmware (Codesys version, not e!Cockpit). I have Wago 750-8212 with firmware 0.4.04.03(26). When I tried to run 'KNX SL' or even 'Device Reader', I have got [FATAL ERROR] Unresolved reference: 'CODEMGETCONTENTBYFIRMCODE3' [FATAL ERROR] Unresolved reference: 'CODEMGETCONTENTBYFIRMCODE2' [FATAL ERROR] Unresolved reference: 'CODEMGETCONTENTBYFIRMCODE2' What probbalby means that there is no running CodeMeter component on PLC. I have checked /etc/codesys3.d/CODESYSControl.cfg [CmpWebServer] WebServerPortNr=58080 [CmpSecureChannel] CertificateHash=86ccf31839a098ee32067179e26600f1bd6b36f8 [CmpUserMgr] AsymmetricAuthKey=a9d38381e75bbf1bbfc8749e97f536f68238a2ce So the question is if I can somehow add Codemeter to stock firmware? Or should I switched to CODDESYS Control for PFC200 SL or application-base runtime licence?
Last updated: 2024-05-23
Post by stewnguth on New License not working.
CODESYS Forge
talk
(Post)
Hey there, I am pretty new to the codesys space, but I got a codesys control basic M license for my raspberry pi that isntalled with no problem yesterday. Today, I went to install the visualization M locense as well because I went over the variable limit and am getting a "servernotfound" error in codesys when attempting to activate. I also tried to follow the advice in some other threads and install using a license request file on the web interface but am getting a message saying "An internal error occured" when attempting to install the license. Can anyone help me get this up and running? Thanks for your time.
Last updated: 2024-05-23
Post by damian177 on CM4S GPIO's in Codesys
CODESYS Forge
talk
(Post)
Hi, I am running my application on device based on Compute Module 4S (Cortex-A72 (ARMv8) 64-bit ). On this device I installed RPi Runtime in 4.11.0.0 version. In my project I use device: Codesys Control for Raspberry Pi 64SL and my project works, but I actually do not have acces to all GPIO's , because GPIOs Compute Module is available only in 3.5.16.0 version and it doesn't work. Properly work GPIOs B+/Pi2 but using this device I do not have acces to all GPIO's in CM4S. Anyone of can tell me how add GPIOs Compute Module 4.11.0.0 to my project ?
Last updated: 2024-05-28
Post by fajean on CODESYS control on RPi starts, shortly runs, then exits
CODESYS Forge
talk
(Post)
4.11 appears to solve the problem. Thanks for your help. I had first installed the 64-bit version of RPiOS, but looking at various posts and the product's page on the store which only lists 32-bit compatibility, I downgraded to the 32-bit version. I did this before trying 4.11, and it did not solve the problem. Thus my working system is 32-bit, and I am wondering if I can go back to 64-bit or not. An 64-bit OS is not listed as compatible on the store's web page, but when installing there actually is a 64-bit version listed (automatically chosen when installing on 64-bit, but otherwise greyed out). Is 64-bit supported and the website is out-of-date, or is that some kind of work-in-progress?
Last updated: 2024-06-13
Post by salvadegianluca on SysPlcCtrl23 and C0338: The library 'cmperrors interfaces, 3.5.5.0 (system)' is supported just in 32 bit applications
CODESYS Forge
talk
(Post)
Good afternoon to everyone; I'm stuck with this error and I don't know how to get out from it... I tried several time googling for alternative systems to control the PLC applications and resets but without success. I would like to realize the possibility to reset the CPU and to start/stop the applications as it was possible with the SysPlcCtrl23, but this library is no longer supported in 64 bit systems and it seems due to the cmperrors interfaces sub library that was included in the above said one. Someone found a work around for this issue?
Last updated: 2024-06-14
Post by salvadegianluca on SysPlcCtrl23 and C0338: The library 'cmperrors interfaces, 3.5.5.0 (system)' is supported just in 32 bit applications
CODESYS Forge
talk
(Post)
Good afternoon to everyone; I'm stuck with this error and I don't know how to get out from it... I tried several time googling for alternative systems to control the PLC applications and resets but without success. I would like to realize the possibility to reset the CPU and to start/stop the applications as it was possible with the SysPlcCtrl23, but this library is no longer supported in 64 bit systems and it seems due to the cmperrors interfaces sub library that was included in the above said one. Someone found a work around for this issue?
Last updated: 2024-06-14
Post by salvadegianluca on SysPlcCtrl23 and C0338: The library 'cmperrors interfaces, 3.5.5.0 (system)' is supported just in 32 bit applications
CODESYS Forge
talk
(Post)
Good afternoon to everyone; I'm stuck with this error and I don't know how to get out from it... I tried several time googling for alternative systems to control the PLC applications and resets but without success. I would like to realize the possibility to reset the CPU and to start/stop the applications as it was possible with the SysPlcCtrl23, but this library is no longer supported in 64 bit systems and it seems due to the cmperrors interfaces sub library that was included in the above said one. Someone found a work around for this issue?
Last updated: 2024-06-14
Post by salvadegianluca on SysPlcCtrl23 and C0338: The library 'cmperrors interfaces, 3.5.5.0 (system)' is supported just in 32 bit applications
CODESYS Forge
talk
(Post)
Good afternoon to everyone; I'm stuck with this error and I don't know how to get out from it... I tried several time googling for alternative systems to control the PLC applications and resets but without success. I would like to realize the possibility to reset the CPU and to start/stop the applications as it was possible with the SysPlcCtrl23, but this library is no longer supported in 64 bit systems and it seems due to the cmperrors interfaces sub library that was included in the above said one. Someone found a work around for this issue?
Last updated: 2024-06-14
Post by salvadegianluca on SysPlcCtrl23 and C0338: The library 'cmperrors interfaces, 3.5.5.0 (system)' is supported just in 32 bit applications
CODESYS Forge
talk
(Post)
Good afternoon to everyone; I'm stuck with this error and I don't know how to get out from it... I tried several time googling for alternative systems to control the PLC applications and resets but without success. I would like to realize the possibility to reset the CPU and to start/stop the applications as it was possible with the SysPlcCtrl23, but this library is no longer supported in 64 bit systems and it seems due to the cmperrors interfaces sub library that was included in the above said one. Someone found a work around for this issue?
Last updated: 2024-06-14
Post by salvadegianluca on SysPlcCtrl23 and C0338: The library 'cmperrors interfaces, 3.5.5.0 (system)' is supported just in 32 bit applications
CODESYS Forge
talk
(Post)
Good afternoon to everyone; I'm stuck with this error and I don't know how to get out from it... I tried several time googling for alternative systems to control the PLC applications and resets but without success. I would like to realize the possibility to reset the CPU and to start/stop the applications as it was possible with the SysPlcCtrl23, but this library is no longer supported in 64 bit systems and it seems due to the cmperrors interfaces sub library that was included in the above said one. Someone found a work around for this issue?
Last updated: 2024-06-14
Post by mborchert on PFC100 Error "Bus not running"
CODESYS Forge
talk
(Post)
Hello, i currently want to use a wago 750-8102 with the "codesys control for pfc100" runtime. I want to add the devices connected to the internal pfc100 bus via the "search devices" tab. This was reccommended in the following thread: https://forge.codesys.com/forge/talk/Deutsch/thread/7701332199/ But whenever i try to search for devices codesys just doesnt find anything and i cant close the "search devices" window. Has anyone got an idea what the problem might be? I already tried adding the devices connected to the pfc100 manually but the bus just doesnΒ΄t start. best regards Moritz
Last updated: 2024-06-17
Post by adaml on ScriptEngine - execute "Export -> Bootproject and firmware (SD Card)" from python
CODESYS Forge
talk
(Post)
Hi everybody, recently I was checking how many time consuming manual tasks I can perform with python scripts through ScriptEngine. I have in the project many devices and currently I export bootprojects for them by right clicking on Application, then go Export -> Bootproject and firmware (SD Card) and then point folder where files should be exported. It's fine if project has few devices, but I have some of them with over 30 devices and manual clicking like that is very time consuming. How can I do it with python script? So far I found "create_boot_application" method from Application object (taken by projects.primary.find('Application', True)) but it only generates .app and .crc file instead of full structure to store on SD card (FIRMWARE, USERDATA, SDCARD.INI, Version, Version.txt.sig). Should I use some method to control user interface? Best regards, Adam
Last updated: 2024-07-05
Post by yannickasselin on codesys VLAN tagging
CODESYS Forge
talk
(Post)
Hi, I am looking for exactly the same thing. I would think that using a layer 2/3 managed switch should work but I am not convinced. I would like to test it in order to see if it would be possible to run many Codesys Docker instances on a server and run only 1 ethernet cable from the server to a managed switch closer to the machines beeing controlled instead of having to run multiple long ethernet cables. I was going to buy a managed switch in order to test it but I want to first make sure it is possible and I want to figure out exactly what kind of switch I would need. Is this even possible? I think this is a feature that would be very useful paired with "Codesys Virtual Control SL". Thank you
Last updated: 2024-09-07
Post by timvh on Clarifications regarding the appropriate runtime system to use
CODESYS Forge
talk
(Post)
If you are not using any specific Raspberry Pi functionality, then probably the "universal" Control Linux ARM SL is the approriate runtime to run on the Pi. For the license it doesn't matter which runtime version you choose, because this is not hardware based anymore, but application based. Best is to use the latest version of CODESYS. To determine which license you need, double click on your device, go to the tab License metrics.... Generate the code for your application and see which license you need based on the metrics of your application.
Last updated: 2024-09-24
Post by pernockham on Linking to IO during runtime with hot swap?
CODESYS Forge
talk
(Post)
I have a project where a single PLC shall control multiple nodes (up to 10 units?) with IO connected through profinet. Ideally each node should be identical however with time I see situations were different setups/configurations will be used. Codesys PLC (GVLs) |Profinet | |--PNIO-node-1--| | | AIO, | | DIO, | | CNT etc. | |--PNIO-node-2--| | | AIO, | | DIO, | | CNT etc. Ideally I think of a configuration through yaml/xml-files (the assignment/linking of the profinet nodes towards GVL-variables in the PLC as well as scaling, channel configration etc.). Would be grateful if someone could suggest library/-ies that can handle the following: - Verify what IO is connected to a device/node. - Hot-swap/assign link for IO towards GVLs, either automatically or through a HMI.
Last updated: 2024-10-11
Post by siscu on Raspberry i2c master device
CODESYS Forge
talk
(Post)
I want to implement an extended I2C master for Raspberry Pi Control. I was hoping for it to be as easy as creating a library with a FB that extends i2cMaster and associating it with a device following the forge drivers documentation, but I haven't managed to make it work as the driver behaves only as an i2c slave. I'm thinking this is because the forge forum only talks about extending i2c, and the master portion is omitted since most users won't want to add a custom one. I'd like to know if I'm doing something wrong. Is it really possible to make an I2C master extension device? If so, are there public examples we can check out? Any info on this topic will be appreciated.
Last updated: 2024-10-16
Post by bjarne-pagaard on OPC UA Server Status on Win RTE
CODESYS Forge
talk
(Post)
Hi there, An "OPC Expert" client software is connecting to a Codesys Control RTE (x64) OPC UA Server. It reads only about 25 variables every 5 minutes. The OPC UA Server seems to shut down on the Codesys runtime. Is there any way to get information about the Codesys OPC UA Server status? Restart it? There is nothing in the PLC Logs after the OPC UA Server has started. It works for a while, then it doesn't. Any ideas? Any way of getting more info out of the Codesys OPC UA Server? -Bjarne
Last updated: 2024-10-21
Post by timvh on Modbus TCP & RTU with Control for Linux SL
CODESYS Forge
talk
(Post)
RS485 doesn't seem very logical to use in VPLC's in my opinion. I also don't know if this is supported.... But for TCP/IP, I think you still need to configure the Nic settings. See the attached png. In my case enp6s0. When changing this setting, restart the VPLC. What is really nice, is that you don't have to configure the IP address setting in Linux. By setting the Nic to a certain IP address in the CODESYS instance configuration, this is automatically done for you. I only tested this with EtherCAT, but I guess this works the same for Modbus TCP/IP.
Last updated: 2024-10-23
Post by gediminas on Datasource OPC UA client system failure
CODESYS Forge
talk
(Post)
I am using CODESYS v3.5 SP20 Patch 3 / Control for BeagleboneBlack SL v4.13 and after some time the OPC UA Server crashes. However, Runtime still works without any issues. The events leading up to the OPC server crash are the most suspicious: 1) Mutex deadlock detected - owner thread died, and 2) Runtime received SIGABRT. And it seems very similar with this topic except used versions - issues should be fixed with previous SP's. I can't seem to find any information about these events. Need some pointers in the right direction on how I can fix this problem.
Last updated: 2024-10-25
Post by phoward131 on Alarm Table Filtering
CODESYS Forge
talk
(Post)
I am having trouble getting the alarm table filtering to work. I downloaded the alarm filter latch example project and ran it on the local Codesys Control Win and the filters worked fine. I am trying to replicate it in my project and everything seems to be set up the exact same way and every time I turn on the filter, it shows no alarms. I even started a blank project and just copied in elements from the example project so that it is exactly the same and when I attempt to filter, it again shows no alarms. Could there be some project settings I need to adjust to make this work? I have attached my project with elements copied from the example project and filtering is not working.
Last updated: 2024-10-28
Post by mtho on JSON Utilities - JSON file written with invalid structure
CODESYS Forge
talk
(Post)
I'm using the JSON Utilities SL library to write configurations in my program to a file. I'm generating the JSON data using the builder function block and all appears to work correctly. When I write the jsondata to file, I'm finding that some of the JSON elements are not being written in the right location in the file. Rather than writing they keys under the parent object, they get written outside the root JSON object at the end of the file. If I then try to read the file back into the program, I get an invalid_structure error. I don't get any errors when populating the JSON data or when writing the file. I attached an example of the JSON writer output. The problems begin with key P200. Each P200 should go under MBR1 through MBR3. Among the rest of the keys, they are supposed to be under different parent objects. I am using default values for wsLineBreak and encoding.
Last updated: 2024-03-06
Post by duvanmoreno24 on Modbus writing on value change
CODESYS Forge
talk
(Post)
Yes, I tried to do what you put in the first code. However, I have a problem with that and that is that the inputs must be declared with the type. I have many data types running in my code (real, int, uint, bool) and I can't put them in the same function, another thing is that I need to instantiate that function for everything I want to write to the slave. You put a for to 200 but it means that it has to be the same data type and inside the array, but I want to get them individually. I'm struggling to do it in a good and efficient way like wago's E-cockpit does. in the first screenshot you can see, you simply type in value, change the package of things you want to write in value change and it does everything by itself automatically, without comparing any old and new values and even less having the need to activate a bool. , it is perfect.
Last updated: 2024-04-03
Post by rjwkerkhof on IIot Libraries SL --> Web Socket Client SL Pong issue
CODESYS Forge
talk
(Post)
Dear all, I am developing a Web Socket Client in Codesys 3.5 using the Web Socket Client SL library to retrieve data from a third party. Connecting and reading works fine however after 40 seconds the connection gets interrupted by the server due to keepalive ping timeout. After discussion with third party it seems that the Web Socket Client SL library replys to the Ping request of the Web Socket server BUT does not add the "Application data" = 4 bytes in the body of the Pingframe to the Pongframe. Therefor the server does not recognize the Pongframe send by the Web Socket Client SL library and automatically disconnects. Is this a known issue with the libary or am I doing something wrong? Is there a workaround to add the 4 bytes manually to the Pongframe before replying it to the server? Thanks in advance, Roy
Last updated: 2024-04-09
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND
or OR
.