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 aott33 on Webvisu NO load
CODESYS Forge
talk
(Post)
Should I be looking for anything in particular in the PLC Log? Attached is the xml file from the PLC logger.
Last updated: 2023-09-26
Post by ronald-de-jonge on Codesys StructType in Device Description File
CODESYS Forge
talk
(Post)
We have the same issue when using CODESYS V3.5 SP18 Patch 2. Is there a solution for this issue?
Last updated: 2023-10-30
Post by kumareasu on Runtime System Update
CODESYS Forge
talk
(Post)
When I change the hardware Do I need to buy licence After three years ? Please refer the jpg file.
Last updated: 2023-11-26
Post by snhatton on Saving variable values on power cycle (RevPi Connect)
CODESYS Forge
talk
(Post)
Have you tried using the persistence manager which uses the file system of the controller to store persistent variables?
Last updated: 2023-12-04
Post by eschwellinger on Softmotion axis to CANopen Maxon IDX drive
CODESYS Forge
talk
(Post)
I would try to use the EDS file of the maxon drive.
Last updated: 2024-01-06
Post by eschwellinger on Edge Gateway online, but PLC is not online
CODESYS Forge
talk
(Post)
need the log file - or you write/send it in the CODESYS store my question
Last updated: 2024-01-10
Post by jeffersonhui on External file with relative path
CODESYS Forge
talk
(Post)
I have the same question as well, anyone have any ideas? Thanks
Last updated: 2024-01-15
Post by saugat10 on Problem installing Multicore codesys control in raspberry pi 4
CODESYS Forge
talk
(Post)
I found the solution. I had to add the following line in /boot/config.txt file arm_64bit = 0
Last updated: 2024-02-07
Post by eschwellinger on File transfer via visu and codesys automation server
CODESYS Forge
talk
(Post)
Hi, this will be possible with 1.33.0.0 release! Regards Edwin
Last updated: 2024-03-07
Post by flavinhofh on Send file from codesys to...... ftp, cloud, etc
CODESYS Forge
talk
(Post)
but how to send the files via FTP using this open source code ?
Last updated: 2024-03-12
Post by eschwellinger on Raspberry PI4 Serial Port
CODESYS Forge
talk
(Post)
no config file is ok, the feedback is: your hardware must support this send/receive switching
Last updated: 2024-03-19
Post by jglueck on Create a package with EDS file
CODESYS Forge
talk
(Post)
I have the same question. I am starting to think no one uses CAN on PLCs anymore.
Last updated: 2024-04-16
Post by wollvieh on Launch a *.exe file from codesys
CODESYS Forge
talk
(Post)
https://faq.codesys.com/plugins/servlet/mobile?contentId=106889218#content/view/106889218
Last updated: 2024-04-19
Post by wollvieh on Launch a *.exe file from codesys
CODESYS Forge
talk
(Post)
https://faq.codesys.com/plugins/servlet/mobile?contentId=106889218#content/view/106889218
Last updated: 2024-04-19
Post by peterned on CNC - system goes to X=0 Y=0 before CNC file execution starts, how to avoid that?
CODESYS Forge
talk
(Post)
Hi, I have a XY system and use a CNC file to move it. Everything works OK, except for the following: when CNC execution starts, the system rushes at high speed to (X=0, Y=0) point, and only then goes to the first line of the CNC file. If one of the axes is near 0, the system jumps and immediately stops with an error. In the CNC file settings (screenshot attached) I specified low default values for speed/acceleration and a start position different from 0,0 - but all that is ignored. Any idea how to avoid that move to 0,0 ? Thanks.
Last updated: 2024-04-26
Post by peterned on CNC - system goes to X=0 Y=0 before CNC file execution starts, how to avoid that?
CODESYS Forge
talk
(Post)
Thanks Georg, that fixed it.
Last updated: 2024-05-07
Post by simonep on new version of CODESYS have problem to load GSDML files
CODESYS Forge
talk
(Post)
I am trying to load a GSDML file of a PROFINET gateway device
Last updated: 2024-05-20
Post by simonep on new version of CODESYS have problem to load GSDML files
CODESYS Forge
talk
(Post)
I am trying to load a GSDML file of a PROFINET gateway device
Last updated: 2024-05-20
Post by simonep on new version of CODESYS have problem to load GSDML files
CODESYS Forge
talk
(Post)
I am trying to load a GSDML file of a PROFINET gateway device
Last updated: 2024-05-20
Post by simonep on new version of CODESYS have problem to load GSDML files
CODESYS Forge
talk
(Post)
I am trying to load a GSDML file of a PROFINET gateway device
Last updated: 2024-05-20
Post by simonep on new version of CODESYS have problem to load GSDML files
CODESYS Forge
talk
(Post)
I am trying to load a GSDML file of a PROFINET gateway device
Last updated: 2024-05-20
Post by simonep on new version of CODESYS have problem to load GSDML files
CODESYS Forge
talk
(Post)
I am trying to load a GSDML file of a PROFINET gateway device
Last updated: 2024-05-20
Post by ppix on Establishing TLS Connection with MQTT Broker using MQTT Client SL Package
CODESYS Forge
talk
(Post)
For anyone confused with the process visit this link (the bottom section about creating a .pfx file) https://content.helpme-codesys.com/en/LibDevSummary/certificate.html#import-of-client-certificates-with-private-key. I solved this problem by creating a .pfx file and importing it into the security store under 'Own Certificates'(must have SP18 or newer to import .pfx). I used a gitbash shell to enter the openssl command that created the .pfx file. Once you import the file, in your TLS context, set your 'sUseCaseName' to be the same as the name listed in the 'Information' column of your imported certificate. This did it for me
Last updated: 2024-06-20
Post by wollvieh on Cannot Save CSV File on Windows Computer Using CODESYS and Control Win
CODESYS Forge
talk
(Post)
https://forge.codesys.com/forge/talk/Runtime/thread/a113f7c93b/#5938
Last updated: 2024-07-04
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
.