Here an interesting ask from Martin, shared here as it could interest other people for sure : "Hello, I have clicked on the classicladder -0.9.113.tar.gz file on sourceforge.net then let archive manager (Ubuntu 18.04 LTS) manage things. I now have a folder /classicladder Type: Folder (inode/directory) 254 items, totalling 3.8 MB Parent Folder: /home/ubuntu. When I click on the classicladder icon (application/x-executable...), nothing appens, the program doesn't start. Any clues on what is going on?...
Hi Marc! I am sorry i did not check if you responded this comments but hey! you did! I was just passing by to see if there was any improvement. I added a lot of stuff to this classic ladder project. Most of them involving sending and reading strings from serial port, string type variables and so forth. I did an HMI with QT framework and a process with SOEM (Ethercat master) that uses shared memory to communicate with classic ladder and map I/Os so control the real world with input and output modules...
Hello again Franco, Yes theses two new "classic" functions should be added. Actually I just do "x2" or "/2", or ... when needed. To be able to have constants in functions (instead of only variables), it would be better to just create a new VariableOrConstant() function and call it instead of Variable() - no need to parse for a possible text function or a new complex term. Else two others things: -> if you have interesting projects examples for ClassicLadder that can be diffused with the project,...
Hello again Franco, Yes theses two new "classic" functions should be added. Actually I just do "x2" or */2", or ... when needed. To be able to have constants in functions (instead of only variables), it would be better to just create a new VariableOrConstant() function and call it instead of Variable() - no need to parse for a possible text function or a new complex term. Else two others things: -> if you have interesting projects examples for ClassicLadder that can be diffused with the project,...
Hello again Franco, Yes theses two new "classic" functions should be added. Actually I just do "2" or /2", or ... when needed. To be able to have constants in functions (instead of only variables), it would be better to just create a new VariableOrConstant() function and call it instead of Variable() - no need to parse for a possible text function or a new complex term. Else two others things: if you have interesting projects examples for ClassicLadder that can be diffused with the project, I'm interested...
Hello Franco, Thanks for your valuable proposal. It will always be better than a crash of course ! ;-) Perhaps we could also add a boolean system variable to know that an arithmetic error occur + an integer system variable with an info to know where (rung...?) For a next release... Best regards, Marc.
Hi Mark, I added two functions i needed to the Function() function and i also noticed that if you used a constant as parameter of the function it will throw an error so i changed the Variable() function to the Term() funaction when looking for a variable %W1=ABS(-1) <- error %W1=ABS(%W2) <- works Follows the complete code arithmtype Term(void); arithmtype Function(void) { char tcFonc[ 20 ], *pFonc; int Res = 0; /* which function ? */ pFonc = tcFonc; while((unsigned int)(pFonc-tcFonc)<sizeof(tcFonc)-1...
Hi Marc, If you divide by zero the program crash.. It is not that i want to divide by zero but when you write an expression and click apply it will evaluate the expression and the program will crash (10/%w1 and %w1=0 => crash) Checking Siemens PLC if the divisor equals 0, just overide the result and set it to 0, it is better than a crash. I did the following modification in arithm_eval.cpp from if (*Expr=='/') { Expr++; Val = Term(); //Pow(); if (ErrorDesc==NULL){ Res = Res / Val; } } else if (*Expr=='%')...
Hello, Sorry for so long reply... Do you are able to reproduce it each time ? (here...
When I close the app with Symbols Window enabled, it fails to start again unless...