Post by noah on "Invalid Value" for Variables at Runtime
CODESYS Forge
talk
(Post)
Hello, I also have the problem that suddenly all variables in my project were invalid and shown as "???" during runtime. Could you manage to fix the problem in the last 4,5 years ;) ? Because I tried everythin to fix it but nothing worked. I feel like maybe this is a bug. Thank you.
Last updated: 2026-03-09
Home (version 1) discussion
oemcba
wiki
(Thread)
Home (version 1) discussion
Last updated: 2026-03-09
wiki Discussion
hhermsen
wiki
(Discussion)
Forum for wiki comments
Last updated: 2026-03-09
(no subject)
hhermsen
wiki
(Thread)
Last updated: 2026-03-09
Home
hhermsen
wiki
(WikiPage)
Project Members: hhermsen (admin)
Last updated: 2026-03-09
Escape character behavior for hex values in string -- what gives?
CODESYS Forge
talk
(Thread)
Escape character behavior for hex values in string -- what gives?
Last updated: 2026-03-09
Home (version 1) discussion
noah
wiki
(Thread)
Home (version 1) discussion
Last updated: 2026-03-09
Post by gordonkeller360 on Escape character behavior for hex values in string -- what gives?
CODESYS Forge
talk
(Post)
I have a program which sequentially places byte representations of characters from a string into an array. FUNCTION_BLOCK MoveBytesFromString VAR_IN_OUT abRxBuf: ARRAY [0..79] OF BYTE; END_VAR VAR testString : STRING := '$0A$R$L$TTesting,123...$94$86$0A'; iCount: DINT; END_VAR ---------------------------------------------------------------------------------------- // clear the buffer MEM.MemFill(ADR(abRxBuf), 80, 0); FOR iCount := 0 TO LEN(testString) - 1 DO // account for undesired null terminator of string abRxBuf[iCount] := testString[iCount]; END_FOR Escaped characters, like $T, $N, etc. work just fine, and so do their hex representation counterparts ($09, $0A, etc). However, when I put something like $94, I get a set of nonsense values... see image attached after one spin of the program. Could someone explain to me what is happening here? I'll continue to investigate...
Last updated: 2026-03-09
wiki Discussion
gaga1
wiki
(Discussion)
Forum for wiki comments
Last updated: 2026-03-10
blog Discussion
gaga1
blog
(Discussion)
Forum for blog comments
Last updated: 2026-03-10
(no subject)
gaga1
wiki
(Thread)
Last updated: 2026-03-10
Home
gaga1
wiki
(WikiPage)
Project Members: gaga1 (admin)
Last updated: 2026-03-10
wiki Discussion
ferrraris
wiki
(Discussion)
Forum for wiki comments
Last updated: 2026-03-11
blog Discussion
ferrraris
blog
(Discussion)
Forum for blog comments
Last updated: 2026-03-11
(no subject)
ferrraris
wiki
(Thread)
Last updated: 2026-03-11
Home
ferrraris
wiki
(WikiPage)
Project Members: ferrraris (admin)
Last updated: 2026-03-11
wiki Discussion
topcoolgames102
wiki
(Discussion)
Forum for wiki comments
Last updated: 2026-03-11
blog Discussion
topcoolgames102
blog
(Discussion)
Forum for blog comments
Last updated: 2026-03-11
Home
topcoolgames102
wiki
(WikiPage)
Project Members: topcoolgames102 (admin)
Last updated: 2026-03-11
(no subject)
topcoolgames102
wiki
(Thread)
Last updated: 2026-03-11
Post by yannickasselin on CloseTargetVisu
CODESYS Forge
talk
(Post)
To shutdown the TargetVisu: Add the VisuElemBase library to your project then call VisuElemBase.Visu_PRG.RemoveAllTargetVisuClients(); Exemple: PROGRAM PLC_PRG VAR xShutdownTargetVisu: BOOL; END_VAR ---------------------------------- IF xShutdownTargetVisu THEN xShutdownTargetVisu := FALSE; VisuElemBase.Visu_PRG.RemoveAllTargetVisuClients(); END_IF I tried calling RemoveAllTargetVisuClients() directly from a button mouse click event but it makes the Visu crash. So better using the code above and just set xShutdownTargetVisu to TRUE from the button. Works fine for me. To start the TargetVisu: From a cmd prompt. This will start the TargetVisu C:\Program Files\CODESYS\CODESYS Control RTE3>VisualClientController.exe --application=Application --flags=1 You can then place a .bat file on the desktop and put this inside: CD "C:\Program Files\CODESYS\CODESYS Control RTE3" VisualClientController.exe --application=Application --flags=1 exit Double clicking the .bat file will start the TargetVisu. You may need to replace the Application name by your own application name. Good to know: In the cmd above, if you replace --flags=1 by --flags=2, it will shutdown the TargetVisu.
Last updated: 2026-03-11
wiki Discussion
mateuszn
wiki
(Discussion)
Forum for wiki comments
Last updated: 2026-03-11
blog Discussion
mateuszn
blog
(Discussion)
Forum for blog comments
Last updated: 2026-03-11
(no subject)
mateuszn
wiki
(Thread)
Last updated: 2026-03-11
Home
mateuszn
wiki
(WikiPage)
Project Members: mateuszn (admin)
Last updated: 2026-03-11