ekanderson

Members
  • Content Count

    115
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ekanderson

  • Rank
    Advanced Member
  1. ekanderson

    Page Capture

    Use something like Irfanview and do a system call to it.
  2. ekanderson

    Saving Variable Values

    write_read_s_chan.txt Depending how often you want to backup... Irun this code every 30 minutes for standard channels, virtual channels and misc variables. This only works if your *.ctl file does NOT start collecing data on startup.!!!!!!!!!! This code only shows standard channels but others are similar. My data interval is every 6 minutes. When you restart your *.ctl file, you must clear all channel (virtual and standard) data, read in all your channel data and any misc vars, fill missing data for the period the system was down, then start data collection.
  3. ekanderson

    DFex ftp uploading

    think i've got try/catch working. sort of curious how it works, only thing i can figure is that try starts an overrview monitor thread, and catch() extracts error msgs, and endcatch shuts it all down. now all i have to do is write code to account for all the identified errors. suggestion, had catch() strx =strLastError endcatch looks like if no error, strx not set to null string. thanks. eka
  4. ekanderson

    DFex ftp uploading

    Haven't been able to bullet-proof ftp.upload() generate errors. Normally have 2 sequences in infinite loops wirh varous delays(). One is a watchdog with 10 sec delay, the other collects data from a LJ U3 (LJ_raw_io) at 10 sec and 60 sec intervals. At end of 360 secons it does an x=LJ_conv() sequence call, then continues looping. LJ_conv converts raw data and puts into channels with *.addvalue this triggers channel event code every 6 minutes. One of which... every 6 minutes ftp's 2 files. every hour spawns a thread (beginseq) that ftp's several files. and IF at end of day, does several more ftp's of files. ALL ftp'ing is done thru calls to one sequence (ftp_to_eka) The question..... WHERE do I put TRY/CATCH code???? since ftp.upload() is running as an async function. and with my normal server, can take over 11 sec (ftp.timeout=11000) to complete xfr. Only one ftp error has a DF tag (FTP-0000), the rest typically start with "An error occurred...." The FTP-0000 can occur even tho I have code similar to this BEFORE setting up ftp params while (FTP.bytesToTransfer !=(-1)) delay(2) count +=1 if (count >10) do_not_ftp=1 break endif endwhile DFexp 5.84, WinXP, grunge machine Any suggestions ??? eka
  5. ekanderson

    DFex ftp uploading

    I'm mainly interested in the ff vars always being -1. ftp.bytestoTransfer and ftp.bytesTransfered so i can adjust the ftp timeout variable sometimes the webpage server (normally home.bellsouth.net) is sluggish receiving ftp data. if i knew the difference between *toTransfer and *Transfered, could adjust the timeout. eka
  6. trying to find out why ftp.upload() is failing DFexp 5.84 LJ U3 set up all stuff for ftp xfr print doubletostr ftp.bytestoTransfer and ditto ftp.bytesTransfered both always -1 do ftp.upload() with ignore("all") BEFORE since I often get server time out with no error code then ignore("") print doubletostr ftp.bytestoTransfer and ditto ftp.bytesTransfered both always -1 This is while trying to connect to a server that is down (home.bellsouth.net) Connecting to a server that is receiving ftp data results in the same -1 values Are bytes* ONLY valid during the ftp.upload() function call?????? tried the print right after ftp.upload() and got same -1's what am I doing wrong? I'm trying to find out if there is an ftp upload failure so that I can switch webpage servers. ek
  7. ekanderson

    DaqFact Express updates

    What do us LJ users do to get 16 channels (what we used to have), while still being able to update DFExpress????? Was going to try DF trial, in order to update to DFExpress 5.85. Luckily checked the DF version selection matrix, which demotes DFExpress users to 8 channels. eka
  8. ekanderson

    Daylight Savings Time

    am using Daqexpress for a weather station with LJ U3 that stays up for one to two months. DaqExpress'es clock can loose up to a minute plus in that time. will usertime.dll work with express????? thanks eka
  9. ekanderson

    sequence collapse

    last line 'endif' in suggested code starting with 'ftp.upload' should it be an endwhile?????
  10. ekanderson

    file functions

    DFE 5.83 build 1632 Have a sequence that does private x x =file.Open(V_Stack_filename, 0,1,0,1) // V_stack_filename never changes file.write(x, string) " file.flush(x) file.close(x) return(1) that bombed before flush and close due to a typo in a file.write string Corrected typo and Sequence continued to execute every 6 minutes. Subsequent executions of the sequence/function gave no error that filename was already open. However the file could NOT be FTP'ed, because it was "in use", with no DF error code. Question on file.closeall(). Does this apply ONLY to files opened with file.functions or does it also affect logging and export files.????? thanks eka
  11. // This doesn't do any thing, and no complaint NO closing " Export.xp_solar_day_end.strFileName =ourPath +YY +"solar_day_xp_end.csv // This doesn't do any thing, and no complaint Export_xp_day* declared nowhere // 1st _ should have been a . (period) Export_xp_day_end.strFileName =ourPath +YY +"day_xp_end.csv" These were hard to find and correct since code only kicks in at the end of each year. DFE 5.83 build 1632
  12. I want to have a button "Exit Program" that does ff. *************************** Action 1 is a quick seqence that executes private xx =xit_program_code() // returns 0, if AOK to exit // code asks if user really wants to exit, if yes, writes some data to files // if files written w/o mishap, returns 0, otherwise non-0 if (xx !=0) return() endif // Regretably, it appears that the return() does NOT work in a quick seq. // and I get a program exit *************************** Action 2 exit <<<<<<<<<<<<<<<<<<<<<<<< end button Is there another way around this??????????????????????? thanks eka
  13. ekanderson

    Graphing Stopped, everything else OK

    I'm ftp'ing the graph page to my web page every hour, and also saving it at the end of each day, so it is a concern, but as you say it is a very rare occurrence. Probably other persons are doing the same, so I'll try the onPaint bit and in a year or so might see if it works and let you know (if we both remember it :>))..... thank you ek
  14. ekanderson

    Graphing Stopped, everything else OK

    Slightly post-Santa (if we believe Xmas eve tale). Indeed rare, first time in about a year of almost continuous operation. Only one thread at Acquisition level, several at PID, most at logging. Dedicated system, typically clocking <5% CPU usage, but god only knows what M$ does when I'm not looking. Out of curiosity, the "idle thread" mentioned, is this DF's or WinXP's??? Anyway of detecting this???? so I can sound an alarm????? Thanks eka
  15. ekanderson

    Graphing Stopped, everything else OK

    An odd occurence: Screen shot of my Page1 attached, of DFExp 5.83 screen taken about 0230 26 Dec 2009. Graph updating stopped about 1930, 25 Dec 2009. In some cases, alphaNumeric values are "smugged" as if overwritten with current values. As far as I can determine, data collection continued correctly. When I click on Page0, Page1 AND Page0 were overlain on each other. A save with history to a new file, DF exit, and restart resulted in everything AOK. ????????????????????? ek