• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About opticaldynamics

  • Rank
  1. opticaldynamics

    Averaging out data

    Hey, I have a pressure vs. Time graph plotting my pressure data from a reactor. The line is pretty jumpy though, from the changing voltage data. How can I average out my pressure data so I can get a more accurate value for the pressure?
  2. opticaldynamics


    ok thanks for all your help I think I have it working now
  3. opticaldynamics


    Under Variable Value Component, we have the caption called remaining time. the expression for it is: Starttime- (systime() - starttime) / 3600. should the First starttime actually say synthesis time since our synthesis time is set to 25 hours? thanks
  4. opticaldynamics


    okay, I have the timer working in a way. the code seems to work and it displays a number of hours left and decreases over time but it comes up as a huge number such as 125786129.688 hours left..
  5. opticaldynamics


    Okay, so how would i incorporate that into my code so it will start as soon as the temperature is 80? my Code looks like this.. using("device.labjack.") include("c:\program files\labjack\drivers\labjackud.h")//Both lines of code establish connection with LJ //Declare global variables that will be used throughout sequence global uppertemp global setpoint global synthesistime global hysteresis global systime() //ZnO Synthesis, heat up to a certain temperature (uppertemp) while(min(controltemp[0,4])<uppertemp) ePut(0, LJ_ioPUT_DIGITAL_BIT,6,0,0)//set FI06 to output-low (heater on) output=3.6 delay(1) endwhile //Cool to set temp while(max(internal[0,4])>setpoint) eGet(0, LJ_ioGET_DIGITAL_BIT,6,@FI06Reading,0)//set FI06 to input (heater off) output=0 delay(1) endwhile //Control for synthesis time private starttime = systime() while(systime()<starttime + 3600*synthesistime)//control for 1 hour X synthesis time if (internal[0]<setpoint - hysteresis) ePut(0, LJ_ioPUT_DIGITAL_BIT,6,0,0)//heater on output=3.6 endif if (internal[0]>setpoint-1) eGet(0, LJ_ioGET_DIGITAL_BIT,6,@FI06Reading,0)//heater off output=0 endif delay(5) endwhile eGet(0, LJ_ioGET_DIGITAL_BIT,6,@FI06Reading,0)//heater off output=0 Thanks
  6. opticaldynamics


    Hey I am working with a reactor that is set to heat up to 146C then cool down to 80C and stay at 80 for 25 hours. How would I write a code that would start counting down the 25 hours when the reactor gets to 80C so we are able to see how much time is left? Thanks
  7. opticaldynamics


    HI, I've received the following error code when I start a file in daqfactory: D0050:01:0016 LabJack device #1 error: Request made on pin not properly configured for analog/digital. I know for a fact that this program worked about 20 min before this happened. I did not touch any pins, nor did I change anything on the LJ control panel. I noticed however that my frequency measurement component is not displaying numbers (maybe this is the source) I reconnected my pins and the error is still there. What is this error and how can i diagnose what pin it is? Thanks
  8. opticaldynamics

    One log file per day

    Hi, Sorry to bother you about the same topic again, but something must have happened to my program because it no longer logs like you showed me. basically, I have a logging set DataLog with a filename: C:\Documents and Settings\administrator\Desktop\FileData\test1_0927_1143.csv I want this file to change test1, to test2 or any other file name I wish. As mentioned on my above post I also have an export set: ExportData global string name = "C:\Documentss and Settings\administrator\Desktop\FileData\filename" while (1) logging.datalog.strFileName = name + formatdatetime("_%y%d_%H%M.csv", SysTime()) waituntil(floor(SysTime()/86400)*86400+86400) endwhile I then created a variable value component called File name with expression name and set to name. I can click on this and change my file name to C:...........test2, but when I click on start logging and my export set the name changes again to test2. Any help would be appreciated again. Thanks
  9. Hi, I am using a variable value component to set four global variables used in a sequence. For the expression, I put in the variable name. Action is SET TO, and the channel is the variable name. WHenever I close out of the program and get back in, the variable values are crossed out. WHen I click on them to change them, it won't accept the value until I start the sequence, get the error that parameters are empty (because I didn't put anything in for the global variables), and finally stop the sequence. ONce it is stopped, the red x's dissapear and I can change the values. This isn't a big deal, but is there a way to make this better? Thanks
  10. opticaldynamics

    Value reset

    Hi, I am using a variable value component to measure a Hz value of a stirrer that I have. When I turn it off suddenly, the last value is kept. It shows a value of a constant 3Hz for example, even when it is not spinning. NOw obviously this isn't a big deal, but I was wondering is there a way to reset that value to 0 so it doesn't confuse anyone who might see the screen? I created a frequency channel that is a timer. For the expression on the variable value component I used a conversion that included frequency[0] in it. Thanks
  11. opticaldynamics

    One log file per day

    Thanks, it works now. I have another quick question. I average ten data points using channels and log this. On the display, I obviously get a new update every 10 seconds or so. Is there a way to read and show data every second, but log an average of however many points I want or maybe even every 10th point or so? Thanks.
  12. opticaldynamics

    One log file per day

    Do I do a global variable? For example I tried global name while(1) logging.DataLog.strFileName = C:\Docs and settings\admin\desktop\name + formatdatetime("_%y%d_%H%M.csv", SysTime()) waituntil(floor(SysTime()/3600)*3600+3600) endwhile Thanks
  13. opticaldynamics

    One log file per day

    Hello, I have two quick issues with my logging files: 1) I have followed section 5.2 (Batch logging of the Daqfactory - LJ user guide) and I basically have a button that controls logging and a variable value component that shows my file path. I also have an export set (i'm not sure I need this...) When I wish to record data, I click on the file path and enter a file name. However when I start logging and exporting the file name resets to what it is on the export sequence. For example: while(1) logging.DataLog.strFileName = FormatDateTime("C:\Docs and settings\admin\desktop\File1_%y%m%d_%H%M.csv", SysTime()) waituntil(floor(SysTime()/3600)*3600+3600) endwhile SO, when I change the file name to File2 on the popup window, I see it displayed. But when I click export data, it still says File1. Now, obviously I see that in the file name, but how can I get rid of this problem without having to go to the export sequence and changing the name there??? 2) This is related to the export sequence. It currently logs one file for a whole hour on the hour. If I wish to record one big file with 24hrs worth of data do I change the last line of code to: waituntil(floor(SysTime()/3600)*3600+3600*24)???? I can't try it now as I am already logging something with it. Thanks
  14. opticaldynamics

    Switch, Case statements

    That actually sounds great! I hate that version anyway. I will try your recipee2 example. I will need to add a few lines for incorporating my code. Could I have done this from the beginning and not needed to write my old code? I'm just wondering, because your temperature recipee can pretty much do it. I know I have to tweak it again and add ePut and eGet. If you have any suggestions on incorporating my code, it would be appreciated. Thanks so much and for ALL your fast replies!
  15. opticaldynamics

    Recipes in DAQFactory part 2

    Hi, This is a real good piece of information. I guess you can ignore my post from sequences and scripting (switch, case statements), unless you have some time and it is easy to show. I would like to be able to upload my current temp control code into your recipee code. For the future, I figure I will vary recipees for example by only adding a few lines of code such as a digital output line that will trigger a cooling system in my temperature reactor.