oscat.lib > oscat.lib fuer CoDeSys 3
OSCAT_NETWORK.CSV_PASER_BUF
adrian.garcia:
Hi,
I am new in the forum and I don´t speak German, so I will write in english. I am developing a RecipeManager, and one funtionality is import values since file .csv to array of strings. I use following code for read values:
VAR
hFile : DWORD;
dwRead : DWORD;
szFilePath : STRING := 'C:\Temp\CODESYS.csv';
szSeperator : STRING(1) := ';';
szCurrent : STRING(255);
szWord : STRING;
Result : SysTypes.RTS_IEC_RESULT;
END_VAR
hFile := SysFile.SysFileOpen(szFile:=szFilePath, am:=SysFile.AM_READ, pResult:=ADR(Result));
dwRead := SysFile.SysFileRead(hFile:=hFile, pbyBuffer:=ADR(szCurrent), ulSize:=SIZEOF(szCurrent), pResult:=ADR(Result));
Now, I want to use CSV_PARSER_BUF, so I want to obtain values between Separator (',') and copy everyone in a Strings of my recipe, my problem is that This FB not run correctly. I have attached a picture with errors that i have when i build.
I hope help :).....and many thanks for support in advance
Regards,
Adrián
[gelöscht durch Administrator]
peewit:
Hi,
in the network library in the demo folder you can find an example program (see the picture)
[gelöscht durch Administrator]
adrian.garcia:
just now, i was Reading that in other post in Forum. I think with this information I can use this FB.
Thank you very much for support ;) ;) ;)
Regards,
Adrián
adrian.garcia:
Buenos DÃas,
I have attached a picture of my Project, only with FB CSV_PARSER_BUF. I want learn to use this FB, because it is useful for a Project that i am developing. I am using V3.5 SP4 Patch2. I want to use this CSV_PARSER_BUF for import data of a file csv. I have read help document and demo project of this FB in OSCAT_NETWORK, but I don´t understand, so I hope you can support:
1.- How define type of separator ‘,’ or ‘;’ if SEP is type BYTE????
2.- I don’t understand PT type OSCAT_NETWORK.NETWORK_BUFFER, I have seen that it is a pointer of Byte, but How define path and import data to my buffer since file csv????.
Saludos Cordiales,
[gelöscht durch Administrator]
BlueGreenLable:
Congratulations,Couldn't have done it without you! Hugs to you.
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln