Search talk: size of sint

 
<< < 1 .. 13 14 15 16 17 .. 88 > >> (Page 15 of 88)

Post by jeroenaero on CodeSys Raspberry pi I2C driver not found CODESYS Forge talk (Post)
thank you, i tried your library and device description but i don't get analog values. Do i something wrong? i also got an library error at the I2C_BASE functionblock the calcCycleTime gave an variable size error, so i added thet conversion from ULINT_TO_UDINT.
Last updated: 2024-11-07

Post by mondinmr on First IO address of a CAADiagDeviceDefault. CODESYS Forge talk (Post)
I have a device CAADiagDeviceDefault: IoConfig_Globals.Axis_A In our library, we perform introspection of the Etc_SlaveDiag. In that case, we have connectors, and by searching for them by address, I can find them in the IO mapping using the offset and size provided by EtherCAT. However, a Lenze i700 drive, instead of placing the IO mapping in the Etc_SlaveDiag device, places it in a sub-device CAADiagDeviceDefault. So, when I perform introspection, I cannot find the IO correspondences. Yet, in the CAADiagDeviceDefault, I do not find the connectors and cannot do the matching. Is there a way with a pointer or reference to a CAADiagDeviceDefault to obtain the address of the first input and the address of the first output? This is because we have our own motion library with many EtherCAT devices that automatically configure the mappings, but I can't manage to do so with the Lenze i700.
Last updated: 2024-08-22

Post by george32 on CSV file and string manipulation. CODESYS Forge talk (Post)
Dear folks, I think I have a rather simple question but I could not find the right answer to my question: I have made with Excel a CSV file where I would like to have some general data regarding my program variables. I have made an program what let me read the file. The string I am currently get is at follows: 'IP_Adres;192.168.45.12$R$NPort_number;2000$R$NCycle_time;43$R$NStart_Standard_IO;20$R$N' Now I want to split the string in multiple part, which I later would connect to the right variable. By Google and experimenting I have reached to the following code for the first part of the splitting proces: // Splitting the BOM of the string: Received_string := FileReadString; IF LEFT(STR:=New_string,3)= '' THEN Received_string_without_BOM :=RIGHT(STR:= Received_string,SIZE:= (LEN(STR:= Received_string))-3); END_IF //Splitting the remaining string in part for later declaration. WHILE index = 0 DO index_split_part := FIND(STR1:= Received_string_without_BOM,STR2:= '$R$N'); Part_of_String[index]:=LEFT(STR:=Received_string_without_BOM, SIZE:= index_split_part); index := index + 1; END_WHILE However in the splitting proces I could not understand what is really happening. I understand that the Find() function returns the first value the $R$N in the Received_string_without_BOM. This would mean that the index_split_part := 23 I|P| _ |A |d|r|e|s|;|1_|9 |2 |. |1 |6 |8 |. |4 |5 |. |1 |2 |$ |R |$ |N |P | 1|2| 3 |4 |5|6|7|0|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27| So the next part is to read the first 23 characters of the Received_string_without_BOM with the LEFT() function. I expected that the outcome the following was: 'IP_Adres;192.168.45.12$'. However the outcome is: 'IP_Adres;192.168.45.12$R'. I do not understand where the R after the $ sign comes from, because its place is 24 so it would not be added to the part_of the_string[index]. If I hard coded value 24 for the size it gives me the following return: 'IP_Adres;192.168.45.12$R$N'. I would expect everything till the R but the code adds the $N also to the string. I hope someone could explain to my what I am seeing wrong in my point of view? With kind regards, George
Last updated: 2024-09-27

Post by mxj262 on FB having single input but initialized with Array CODESYS Forge talk (Post)
I am adding elements of an ARRAY using pointer to access each element inside a FOR loop and the FOR loop does not stop! What is the right way to use pointers in such case?? I have another loop that is not using pointer and it stops but the loop using pointer keep on adding. METHOD FB_Init: BOOL VAR_INPUT bInitRetains: BOOL; // TRUE: the retain variables are initialized (reset warm / reset cold) bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change) END_VAR VAR_IN_OUT // basically REFERENCE TO window_buffer: ARRAY [*] OF INT; // array of any size END_VAR THIS^.windowPtr := ADR(window_buffer[0]); THIS^.windowSize := UPPER_BOUND(window_buffer, 1) - LOWER_BOUND(window_buffer, 1) + 1; FUNCTION_BLOCK FB500 VAR_INPUT END_VAR VAR_OUTPUT END_VAR VAR windowPtr: POINTER TO INT; windowSize: DINT; currentIndex: UINT; element1:INT; element2:INT; i:INT; j:INT; sum:DINT:=0; END_VAR element1:=windowPtr[0]; // read the first element of the Array dynamic memorry element2:=windowPtr[1]; FOR i:=0 TO (TO_INT(windowSize-1)) BY 1 DO // this loop does not stop Sum:=sum + windowPtr[i]; END_FOR FOR j:=0 TO 5 BY 1 DO // this loop stops j:=j+1; END_FOR https://ibb.co/k3DhkZT
Last updated: 2024-05-06

Ranges, Lambdas, on Fixed arrays of structs CODESYS Forge talk (Thread)
Ranges, Lambdas, on Fixed arrays of structs
Last updated: 2023-08-31

Save jitter measure of main task in file CODESYS Forge talk (Thread)
Save jitter measure of main task in file
Last updated: 2020-08-07

Ged rid of lines on Chart XY CODESYS Forge talk (Thread)
Ged rid of lines on Chart XY
Last updated: 2022-04-05

Resolution of visualization (for RPi's LCD 800x480) CODESYS Forge talk (Thread)
Resolution of visualization (for RPi's LCD 800x480)
Last updated: 2015-11-22

The configuration file of the PLC CODESYS Forge talk (Thread)
The configuration file of the PLC
Last updated: 2016-04-11

Where is data of ENIP getAttributeSingle stored? CODESYS Forge talk (Thread)
Where is data of ENIP getAttributeSingle stored?
Last updated: 2023-04-20

Encryption of application and communication not working CODESYS Forge talk (Thread)
Encryption of application and communication not working
Last updated: 2021-11-04

Adding a scaling factor to text sizes of different languages CODESYS Forge talk (Thread)
Adding a scaling factor to text sizes of different languages
Last updated: 2017-03-31

Variable number of arguments in a user-defined function CODESYS Forge talk (Thread)
Variable number of arguments in a user-defined function
Last updated: 2012-01-08

The intent of two Library Managers in a Project CODESYS Forge talk (Thread)
The intent of two Library Managers in a Project
Last updated: 2016-08-22

Initialization of visualization variables and cyclic code execution CODESYS Forge talk (Thread)
Initialization of visualization variables and cyclic code execution
Last updated: 2023-10-01

Access project information of references library by script CODESYS Forge talk (Thread)
Access project information of references library by script
Last updated: 2023-10-23

Axis variable indicating modulo of finite setting CODESYS Forge talk (Thread)
Axis variable indicating modulo of finite setting
Last updated: 2023-11-25

License status of Linux 64Bit runtime via CLI CODESYS Forge talk (Thread)
License status of Linux 64Bit runtime via CLI
Last updated: 2023-12-04

Management of a PLC network from a remote station CODESYS Forge talk (Thread)
Management of a PLC network from a remote station
Last updated: 2023-12-04

Extracting information out of a *.library or *.compiled-library file CODESYS Forge talk (Thread)
Extracting information out of a .library or .compiled-library file
Last updated: 2023-12-04

Alarm Management - Import and Export of AlarmGroup CODESYS Forge talk (Thread)
Alarm Management - Import and Export of AlarmGroup
Last updated: 2023-12-06

Getting detailed information of a property without export CODESYS Forge talk (Thread)
Getting detailed information of a property without export
Last updated: 2012-03-06

How to get component name and IDs of enumeration? CODESYS Forge talk (Thread)
How to get component name and IDs of enumeration?
Last updated: 2022-11-21

libs and devices (xml files) of Raspberry Pi CODESYS Forge talk (Thread)
libs and devices (xml files) of Raspberry Pi
Last updated: 2020-02-21

data exchange at the end of each CoDeSys cycle CODESYS Forge talk (Thread)
data exchange at the end of each CoDeSys cycle
Last updated: 2010-07-12

<< < 1 .. 13 14 15 16 17 .. 88 > >> (Page 15 of 88)

Showing results of 2198

Sort by relevance or date