Hi all,
I can save multiple string table on a SD card, but how can I FTP the same string tables in a separate file? I can FTP one string table.
Currently I have 4 string tables sDataA,sDataB,sDataC, and sDataD and use blocks to send them to SD card using separate file handles for each of them.
my query is how can i ftp the same tables. should I create 4 different ftp file handles? is it possible to do in blocks or should i used script?
I currently can send one string table visa script example. see code below:
Day = GetDay();Year = GetYear();Month = GetMonth();
NumberToString(Day, sJday);NumberToString(Month, sMonth);
NumberToString(Year, sYear);
sDateAdded = sJDay + "_" + sMonth + "_" + sYear;
nCommStatus = OpenOutgoingCommunication( sFTPSERVER );
if (nCommStatus == 0) then
//Option 1: Construct command that opens a new or existing file on the FTP server sSendFile = "dest:/DataLog_" + sDateAdded +".csv";
nCommStatus2 = SendCommunicationHandleCommand( sFTPSERVER , sSendFile );
//Option 2: dynamic file name but directory must be created //
sSendFile = "dest:/" + sMonth + "/DataLog_" + sJday + ".txt"; /
/nCommStatus2 = SendCommunicationHandleCommand( ch_FtpServer , sSendFile );
if (nCommStatus2 == 0) then// Transmit table
nCommStatus3 = TransmitStrTable( nTableMax , 0, sTestTable, sFTPSERVER );
if (nCommStatus3 == 0) then
sMessage = "File sent to FTP site";
else
sMessage = "Tranmitting failed";
endif
else sMessage = "Destination command failed";
endif
else
sMessage = "Opening communication failed";
endif
CloseCommunication( sFTPSERVER );
can someone please show me the example for ftping multiple file