Home (version 1) discussion
nelsonreis
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-03-07
Post by pernockham on Inheritence of struct,
CODESYS Forge
talk
(Post)
Apparently my construction will not work as any of the sub-types are not be able to accept any (further) value-initiation. Ie: string_item : log_data_base := (string_value := 'test', val_type := STRING_); is not eq to (the string_value will not be assigned): string_item_2 : log_data_string := (string_value := 'test'); Because effectively for the compiler this is eq. to a "double" assignment where the compiler sees only the first assignment (my guess). string_item_2 : log_data_base := (val_type := STRING_) := (string_value := 'test'); Im not sure this should be treated as a bug, but it would surely be nice to be able to use this construction (compiler is 3.5.20.40). Anyone see any other alternative for solution (other than 4 complete STRUCTS with all fields individually defined)?
Last updated: 2025-03-07
Home (version 116) discussion
co♻e: unittest framework for CODESYS
home
(Thread)
Home (version 116) discussion
Last updated: 2025-03-07
Home (version 1) discussion
clarenced
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-03-07
wiki Discussion
liai
wiki
(Discussion)
Forum for wiki comments
Last updated: 2025-03-08
blog Discussion
liai
blog
(Discussion)
Forum for blog comments
Last updated: 2025-03-08
(no subject)
liai
wiki
(Thread)
Last updated: 2025-03-08
Home
liai
wiki
(WikiPage)
Project Members: liai (admin)
Last updated: 2025-03-08
Post by liai on an not create Symbol Configuration in Codesys V3.5 SP20 Patch 4
CODESYS Forge
talk
(Post)
Just can not create Symbol Configuration in Codesys V3.5 SP20 Patch 4.Showed in the picture. The same PLC works well in SP19. If it lack of some setting in SP20 ?Thanks a lot.
Last updated: 2025-03-08
Post by timvh on Inheritence of struct,
CODESYS Forge
talk
(Post)
Maybe the ANY type can help? https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_datatype_any.html
Last updated: 2025-03-08
Home (version 1) discussion
kirsipr
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-03-08
Post by timvh on an not create Symbol Configuration in Codesys V3.5 SP20 Patch 4
CODESYS Forge
talk
(Post)
Go to the menu Tools - CODESYS Installer. Here you can manage your add-on packages. Go to Browse, find CODESYS Communication and install this add-on.
Last updated: 2025-03-08
Post by liai on an not create Symbol Configuration in Codesys V3.5 SP20 Patch 4
CODESYS Forge
talk
(Post)
Picture
Last updated: 2025-03-08
Post by timvh on Assignment Efficiency - Repetitive Assignment vs IF statement
CODESYS Forge
talk
(Post)
You can consider using OR_ELSE: Coils[0] := Coils[0] OR_ELSE (Buttons[0] AND Sensors[0] > 6); https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_operator_or_else.html IF Coils[0] is TRUE, then the rest is not relevant anymore and doesn't have to be evaluated anymore. PS, there is also an AND_THEN https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_operator_and_then.html
Last updated: 2025-03-08
Home (version 1) discussion
starmaxou
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-03-08
Version Control
CODESYS Forge
talk
(Thread)
Version Control
Last updated: 2025-03-08
Post by timvh on Version Control
CODESYS Forge
talk
(Post)
https://store.codesys.com/en/codesys.html#versions
Last updated: 2025-03-08
Post by pernockham on Inheritence of struct,
CODESYS Forge
talk
(Post)
Interesting, thanks! Didnt know about ANY before, and will sure find a use-case for it. Im not sure it will help me here though, it seems to me that an ANY will not accept a string assignment? I actually think that the "ALIAS" should work, that was a hard found error. I had a fair bit of scratching my head looking for misdirected pointers before I understood what was (not) happening. I will use the work-around of individual structs instead.
Last updated: 2025-03-08
Home (version 1) discussion
albertisa
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-03-08
Home (version 1) discussion
test9
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-03-08
Post by timvh on Problem Reading Registers via Modbus from non Codesys device
CODESYS Forge
talk
(Post)
According to the documentation: https://wiki.teltonika-networks.com/view/RUT956_Modbus You need to create a Channel to read 2 registers from address 143 to get the lattitude. It doesn't specify if you need to read it as a Holding Register or as an Input Register. You could try both. So in the Teltonika router, you need to enable it as being a Modbus Server. Then in CODESYS add an Ethernet Adapter, then a Modbus Client (Master) and to the Client (Master) add the Modbus Server (Slave). Set the IP address and add the Channel. The please consider that CODESYS doesn't update any variables when they are not used in the application. In the I/O mapping tab of your I/O configuration, you can set the "Always update" to enabled.
Last updated: 2025-03-08
Post by wayne-riesterer on Assignment Efficiency - Repetitive Assignment vs IF statement
CODESYS Forge
talk
(Post)
Thanks for your responses. I like to write the leanest possible code that I can because it makes it much easier to read/maintain/debug. OR_ELSE is what I was looking for. I wasn't sure if CodeSys short-circuited evaluation and I didn't realize this operator existed. Thanks!
Last updated: 2025-03-08
Assignment Efficiency - Repetitive Assignment vs IF statement
CODESYS Forge
talk
(Thread)
Assignment Efficiency - Repetitive Assignment vs IF statement
Last updated: 2025-03-08
Home (version 1) discussion
t-roger
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-03-08
blog Discussion
fischerp
blog
(Discussion)
Forum for blog comments
Last updated: 2025-03-08