Case Function - Multiple Conditions, Is it possible?
CODESYS Forge
talk
(Thread)
Case Function - Multiple Conditions, Is it possible?
Last updated: 2024-11-05
Post by pistola on Case Function - Multiple Conditions, Is it possible?
CODESYS Forge
talk
(Post)
Looking at the help (https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_st_instruction_case.html). I don't think it is possible but I figured I'd ask. I'm looking at have a case that evaluates two variables, instead of having multiple If Else statements I was hoping I could just use a case. Example * Case Var1 & Var 2 of 10 & 10: Instruction Code 10 & 20: Instruction Code 20 & 20: Instruction Code End_Case Obviously I tried typing as noted above and Codesys threw an error. But I was wondering if there was a different way of programming to make something like this work? If not I'll just use a bunch of If Else Statements, Thanks.
Last updated: 2024-11-03
Post by nz-dave on Bool turning on in case stament in wrong state?
CODESYS Forge
talk
(Post)
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
Last updated: 2023-12-15
Showing nothing instead the %f in case another variable is empty
CODESYS Forge
talk
(Thread)
Showing nothing instead the %f in case another variable is empty
Last updated: 2022-05-19
Post by stuartjr on Disabling forcing of specific variables
CODESYS Forge
talk
(Post)
I also thought that if I had logic writing a value to this variable, then it would override the force anyway, since I thought that the force request was only applied at the beginning and end of the PLC scan. But this doesn't seem to be the case, the force persists throughout the logic regardless of what I write to the variable with logic
Last updated: 2024-03-15
Post by jmfernandes on OpenDir always in error
CODESYS Forge
talk
(Post)
Hello just to give more feedback the error I get is "ERROR_UNKNOWN :represents raw value of 5110" in File.DirOpen. The xDone never gets true, and I never get the listing of files (csv files in this case). In the hDir i get the value of 0 for a DWord!?
Last updated: 2024-07-31
Problem of assigning physical addresses to variables of type ARRAY OF ARRAY as MW and QW
CODESYS Forge
talk
(Thread)
Problem of assigning physical addresses to variables of type ARRAY OF ARRAY as MW and QW
Last updated: 2025-03-31
Assign Initial Value of Array of Byte
CODESYS Forge
talk
(Thread)
Assign Initial Value of Array of Byte
Last updated: 2019-03-08
How to Calculate Checksum of an array of bytes?
CODESYS Forge
talk
(Thread)
How to Calculate Checksum of an array of bytes?
Last updated: 2016-05-08
Retrieve number of elements in an array of function blocks
CODESYS Forge
talk
(Thread)
Retrieve number of elements in an array of function blocks
Last updated: 2020-04-19
Simulation of Communication of PC with PLC via ethernet
CODESYS Forge
talk
(Thread)
Simulation of Communication of PC with PLC via ethernet
Last updated: 2020-10-09
Determination of User defined instances of function by a POU
CODESYS Forge
talk
(Thread)
Determination of User defined instances of function by a POU
Last updated: 2011-02-15
Length of string and Array of bytes
CODESYS Forge
talk
(Thread)
Length of string and Array of bytes
Last updated: 2025-04-02
Post by vsgn on Passing properties as VAR_IN_OUT variables.
CODESYS Forge
talk
(Post)
Hi, in my experience, the best options for such a case could be: 1. Pass a FunctionBlock via VAR_IN_OUT, containing all variables, mehods and properties needed for the logic of this graphic element (be aware of implementing correcly both get and set accessor for properties) 2. Pass an Interface via VAR_INPUT, of which you can use obviously only Properties and Methods. This is much more elegant for me. Here, you can just pass directly the instance of a FunctionBlock implementing such Interface as input. Hope you'll find this suggestions useful.
Last updated: 2025-05-13
Post by jari-koivuluoma on Problem trying Net Base Services 3.5.15.0 TCP connection
CODESYS Forge
talk
(Post)
Solved. Just in case that someone else is now to this also. It seems that the xDone of the TCP_Connection FB goes true once client disconnects and then you need to reset the FB by setting the xEnable to false.
Last updated: 2024-10-04
Post by gseidel on Beckhoff EL7037 softmotion
CODESYS Forge
talk
(Post)
Hi Stefan, we will update our driver to support the EL7037 in our next release of SoftMotion. In case you are interested to test a pre-release, please contact our support and mention this forum post. Best regards, Georg
Last updated: 2024-12-23
Post by matthewkim on Codesys Gateway not running
CODESYS Forge
talk
(Post)
In my case, I used a different version of gateway. ex)3.5.18.5 sysTray gateway start did not work, so I terminated it and made it work with 3.5.18.3 in "codesys installer" "Settings" and was able to connect to the PLC.
Last updated: 2025-06-12
Post by matthewkim on Codesys Gateway not running
CODESYS Forge
talk
(Post)
In my case, I used a different version of gateway. ex)3.5.18.5 sysTray gateway start did not work, so I terminated it and made it work with 3.5.18.3 in "codesys installer" "Settings" and was able to connect to the PLC.
Last updated: 2025-06-12
Post by matthewkim on Codesys Gateway not running
CODESYS Forge
talk
(Post)
In my case, I used a different version of gateway. ex)3.5.18.5 sysTray gateway start did not work, so I terminated it and made it work with 3.5.18.3 in "codesys installer" "Settings" and was able to connect to the PLC.
Last updated: 2025-06-12
Post by eschwellinger on Errors by Code Generate
CODESYS Forge
talk
(Post)
yes no error in my case.
Last updated: 2024-02-17
Bypass of "onlineapp.login"
CODESYS Forge
talk
(Thread)
Bypass of "onlineapp.login"
Last updated: 2014-08-22
Management of Unit Tests
CODESYS Forge
talk
(Thread)
Management of Unit Tests
Last updated: 2018-10-05
Example of CmpIecVarAccess
CODESYS Forge
talk
(Thread)
Example of CmpIecVarAccess
Last updated: 2020-04-03
Cause of error message
CODESYS Forge
talk
(Thread)
Cause of error message
Last updated: 2021-09-18
ARRAY of unknow struct
CODESYS Forge
talk
(Thread)
ARRAY of unknow struct
Last updated: 2017-10-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
.