I had the FB called via a for loop to call a few instances of my FB I have removed it the for loop and just called them 1 by 1. Seems to have sorted the problem. tho, i have other FB's and for loops doing the same thing but they are all fine. below is basically what was happening. var: mVibrator : ARRAY[1..GVL_Settings.Number_Of_Products] OF Main_Vibrator; end_var Controller(PRG) call: FOR v := 1 TO GVL_Settings.Number_Of_Products BY 1 DO; mVibrator[v] (); END_FOR So at state 30: the mVibrator[1].start...
pretty sure its not. ive done a cross reference and only have one write that sets it to true. Only way i can stop it is to remove the function block call from the main pou that is running said case. its got me stumped:/
I have a case statement running a process. during one of the steps it has started calling a bool var that is 2 steps further on in the case? i have even tried //commenting it out but it still turns on at the same point in the case. i have also run a trace but cant see anything that would trigger it. Any Ideas? Cheers
have been testing a program then out of the blue I start getting iodrvethernet errors ( using modbus tcp ) that was with latest version. I downloaded an older version of codesys, that I had used before with no errors. and used version 3.5.17 of the ethernet adapter. That worked fine for a day. then same thing. anyone have any ideas? I feel like some days I spend more time trying to sort out library issues then writing code.
I have a small program i would like to run 3 instances of on one plc. whats the best way to go about this? I was thinking about turning the program POU's(there are 4) into FB's... then call them 3x in a main POU and assign the i/o. But it just seems a bit messy... cheers
on a new project when i try to create a symbol config for my hmi tags, then build my project i get 5 errors. See attacment. Anyone got a fix? i have tried to remove and reinstall the effected libary. thank you
https://faq.codesys.com/pages/viewpage.action?pageId=21135402
just Stumbled over this after days of searching Declaration VAR sAppName : STRING := 'Application'; // must identic to the name in the device tree iecResult : RTS_IEC_RESULT; xInit : BOOL := TRUE; pApp : POINTER TO CmpApp.APPLICATION; stAppInfo : CmpApp.APPLICATION_INFO; pstAppInfo : POINTER TO CmpApp.APPLICATION_INFO := ADR(stAppInfo); sProjectName: STRING; sAuthor : STRING; sVersion : STRING; sDesc : STRING; sLastChange : STRING; END_VAR Implementation IF xInit THEN pApp := CmpApp.AppFindApplicationByName(pszString...
Hi Is there a way to display the project file name (string) so i can have it displayed on the HMI/PLC. So i know what version of the program has been uploaded. Cheers