Austin

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Austin

  1. Got it, thank you. I would like the raw data and peak values to live on the same data sheet. And I would like to create the file using a button. I'm having a hard time with this (I'm new to the software). I've created a button and want to write a quick sequence action to open a dialog, write the file name, and create the file. Then when I start the experiment, all the data starts logging to that file. My script at the moment is 

    FileName = file.FileOpenDialog([],"C:\Users\austi\Dropbox\Product Testing\Cycle Testing Machine\Cycle Test Data\DAQFactor data\",".csv",[])

    The dialog opens and I write the file name, however the file is not created. Can you help me with this?

  2. This is probably an event-based logging problem. I'll expand a bit further..

    I'm toggling two solenoids to control a pneumatic cylinder. I want to log the force the cylinder is exerting at max extension (max force at this position). The cylinder is controlled with a sequence, which I'll post here:

    while (N_cycles_executed < N_cycles)
       //Extension
       Output_contract=5 //turn off contraction solenoid
       Output_extend=0 // turn on extension solenoid
       delay(period_half) // extend for time period
       //Contraction
       Output_contract=0 //turn on contraction solenoid
       Output_extend=5 //turn off extension solenoid
       delay(period_half) //contract for time period
       N_cycles_executed++ //Index number of cycles by 1
       endwhile

     

  3. Hi, I'm logging data from a load cell. The cell is loaded periodically (every second in this case). I am only interested in the maximum load the cell reads every time period; I'd like to avoid logging many data points and having to filter the data later. This way, the file size is much smaller as well. How can I go about doing this? I imagine I need to write a script in the load cell's channel..

    By the way, the time period is a global variable defined in a script, Auto_Start. 

    Thanks!

  4. Hi, I am running a logging and control script on a LabJack U3-LV. Here is the issue I'm trying to solve. I am running a scripted sequence to toggle between two solenoids. I set the number of cycles and time period on a page, then run the sequence. I want the ability to pause the sequence, instead of having to stop and then restart the sequence.

    Here is a video showing the problem. I set the number of cycles to 10, then press "RUN" to start the sequence. I stop it after 4 cycles. When I restart, it starts the sequence again at 0 cycles. I would like to script it so it continues at 5 cycles, and then add another button to stop the program. Is this reasonable?

    Here's my code:

    global N_cycles //declare variable
    global period_half //declare variable
    global N_cycles_executed=0 //empty variable to use in loop
    
    while (N_cycles_executed < N_cycles)
       //Extension
       Output_contract=5 //turn off contraction solenoid
       Output_extend=0 // turn on extension solenoid
       delay(period_half) // extend for time period
       //Contraction
       Output_contract=0 //turn on contraction solenoid
       Output_extend=5 //turn off extension solenoid
       delay(period_half) //contract for time period
       N_cycles_executed++ //Index number of cycles by 1
       endwhile