Search talk: setting value of variable

 
<< < 1 .. 25 26 27 28 29 .. 150 > >> (Page 27 of 150)

Histogramm: Alarmwert mit Variable definieren (..." ist kein gültiger Wert für Single") CODESYS Forge talk (Thread)
Histogramm: Alarmwert mit Variable definieren (..." ist kein gültiger Wert für Single")
Last updated: 2018-10-03

How to use __VARINFO within a function block to obtain the origin variable name? CODESYS Forge talk (Thread)
How to use __VARINFO within a function block to obtain the origin variable name?
Last updated: 2022-03-15

Runtime variable that indicates a user is online to the code CODESYS Forge talk (Thread)
Runtime variable that indicates a user is online to the code
Last updated: 2024-04-22

Post by aris-k on Pack TWO INT variable to one DINT variable CODESYS Forge talk (Post)
You can try this setup: DINTVar := SHL(INT_TO_DINT (Low_Word_INT_Var),16) + INT_TO_DINT(High_Word_INT_Var);
Last updated: 2024-05-07

Post by trusty-squire on How can you get the active frame index from a frame CODESYS Forge talk (Post)
If you are switching a frame based on the "Switch Frame Variable", then just use a variable that is accessible to your program to set your active frame. If you're trying to see which is the active visualization, then use the "CurrentVisu" variable. Note you'll need to enable this by checking it on in the Visualization Manager settings. If it's neither of those, you'll need to be more clear on how you're project is set up.
Last updated: 2025-03-11

Post by alessandro on SysMemCmp SysMemCpy CODESYS Forge talk (Post)
VAR Data1:ARRAY[1..10] OF SINT ; Data2:ARRAY[1..10] OF SINT ; Data3:ARRAY[1..10] OF SINT ; Data4:ARRAY[1..10] OF SINT ; ex_1 : BOOL ; ex_2 : BOOL ; enable : BOOL :=0 ; END_VAR // PROGRAM // The scope of this example is compare and copy the values of two ARRAY only if some value is different using SysMemCmp and SysMemCpy. // In this 2 example we don't use a FOR cicle for do this, and pBuffer1 and pBuffer2 is just a pointer to ARRAY. See details in Library util.SysMem of Codesys // The compare funcion util.SysMem.SysMemCmp is bidirectional if Data1 chanege respect Data2 ex_1 go to 1 and if Data2 change respect Data1 also // but the copy function util.SysMem.SysMemCpy work only from source ARRAY pSrc:=ADR(Data1) to destination ARRAY pDest:=ADR(Data2) // Example 1 Full ARRAY compare and copy // This compare 2 different equal ARRAY and if there is some difference ex_1 go to 1 and if you give enable he copy Data1 in Data2 ex_1 := TO_BOOL(util.SysMem.SysMemCmp(pBuffer1:=ADR(Data1), pBuffer2:=ADR(Data2), udiCount:=SIZEOF(Data1))); IF ex_1 AND enable THEN util.SysMem.SysMemCpy(pDest:=ADR(Data2), pSrc:=ADR(Data1), udiCount:=SIZEOF(Data1)); END_IF // Example 2 Only selected area of the ARRAY compare and copy // This compare 2 different equal ARRAY starting from position number [3] for 4 byte in this case start at position [3] and finish at position number [6] // and if there is some difference only in area [3..6] of the ARRAY ex_2 go to 1 if you give enalbe he copy Data3[3..6] in Data4[3..6] // if something change in other array position[0..2] or [7..10] are ingnored ex_2 := TO_BOOL(util.SysMem.SysMemCmp(pBuffer1:=ADR(Data3[3]), pBuffer2:=ADR(Data4[3]), udiCount:=4)); IF ex_2 AND enable THEN util.SysMem.SysMemCpy(pDest:=ADR(Data4[3]), pSrc:=ADR(Data3[3]), udiCount:=4); END_IF // Attention udiCount input is intended in <byte> in the example 1 I pass to udiCount:=SIZEOF(Data1) for compare and copy the intere ARRAY and // SIZEOF pass the size of intere ARRAY in byte to the function input, in this 2 examples I used variable type SINT each one occupie 1 byte and one position in the ARRAY // and in the example 2 I pass udiCount:=4 for compare and copy only 4 position of Data3/4[3..6] if you want to extend this example and use it for an ARRAY OF WORD // remember that each WORD will occupe 2 byte (16 bit) and you will have to pass udiCount:=SIZEOF(Data1) if you need to compare intere ARRAY example 1 // but need udiCount:=(42) for the example 2 because need to compare and copy 4 word each occupie 2 byte (16 bit). // For REAL (32 bit) need udiCount:=SIZEOF(44) for LREAL or (64 bit) need udiCount:=SIZEOF(416) // a good rule is calculate the dimension of the ARRAY in byte without empty space at the end, multiple of data type number for variable bigger then 8 bit // Example : If you want to create an ARRAY for 5 REAL (32 bit) each occupie 4 byte the correct size is ARRAY[0..19] OF REAL 54=20 position. // NOTE : In the example the position of compare function util.SysMem.SysMemCmp is first and the copy function util.SysMem.SysMemCpy inside the IF is after // in one cycle of the program the two array is compared and if there is some difference and enable are copied. // If you move util.SysMem.SysMemCmp after the IF cycle he will copare the ARRAY in the current cycle but the copy of the value will do in the next cycle.</byte>
Last updated: 2025-10-24

Post by durallymax on Help understanding analog in-/outputs CODESYS Forge talk (Post)
WAGO will use 0-32767 as the raw units. Note a value of 3 means over/under range. Map that IO however you please, then scale in your program using any of the available libraries or with your own simple y=mx+b scaling formula to get to the engineering units you desire. Inverse for the AO to get back to 0-32767.
Last updated: 2024-12-15

Post by nulltrace on Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0? CODESYS Forge talk (Post)
your case looks different, the first one was an codesys modbus tcp-slave, your's an Master-Application with gateway. I dont know this Unit, but i would say, from Point of Codesys it looks wrong configured. Just give us more detailed configuration and the please make a sketch of the topology you're trying to realise.
Last updated: 2026-04-08

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

Initialization of POUs (FB_Init) CODESYS Forge talk (Thread)
Initialization of POUs (FB_Init)
Last updated: 2024-07-29

Comparing Arrays of structure CODESYS Forge talk (Thread)
Comparing Arrays of structure
Last updated: 2024-08-23

Array of Program CODESYS Forge talk (Thread)
Array of Program
Last updated: 2024-09-03

Track position of dialog CODESYS Forge talk (Thread)
Track position of dialog
Last updated: 2025-02-25

Inheritence of struct, CODESYS Forge talk (Thread)
Inheritence of struct,
Last updated: 2025-03-14

Automatic assignment of instances CODESYS Forge talk (Thread)
Automatic assignment of instances
Last updated: 2024-10-17

Implementation of IEC-104 CODESYS Forge talk (Thread)
Implementation of IEC-104
Last updated: 2025-10-14

SAfe Shutdown of BBB CODESYS Forge talk (Thread)
SAfe Shutdown of BBB
Last updated: 2017-08-07

ARRAY [*] OF in PLCopenXML CODESYS Forge talk (Thread)
ARRAY [*] OF in PLCopenXML
Last updated: 2018-10-26

Simulation of SysLibStr? CODESYS Forge talk (Thread)
Simulation of SysLibStr?
Last updated: 2012-09-04

Import of .gdc files CODESYS Forge talk (Thread)
Import of .gdc files
Last updated: 2018-12-25

Restoration of Codesys License CODESYS Forge talk (Thread)
Restoration of Codesys License
Last updated: 2023-08-09

<< < 1 .. 25 26 27 28 29 .. 150 > >> (Page 27 of 150)

Showing results of 3729

Sort by relevance or date