bbosse

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by bbosse

  1. Hi all!

    I have a LabJack with the Mux80 AIN expansion board with 3 CB37 terminal boards connected - I'm using it to record from 40 channels simultaneously.  It works fine (for the channels I've tested) but I'm running up against a maximum sampling frequency of 100,000 Hz / 40 channels = 2500 Hz maximum samples per second per channel.

    I would like to increase the sampling frequency to perhaps 8,000 Hz, but if I try to record from all 40 channels at the same time at 8K Hz, it is above the limit of 100,000 Hz overall.

     

    I'm only recording data for 2 seconds every 10 minutes - I'm thinking of making part of the recording in series rather than parallel.  For example, instead of recording from all 40 channels at the same time, record from the first 10 channels, then 11-20, 21-30, and 31-40 one group after the next in series.

    Is this a good solution?  Would I just create different LJM_eStreamStart's with different identifiers?

    scanRate = 8000

    LJM_eStreamStart(identifier1, {"AIN0", "AIN1", "AIN2", "AIN3", "AIN120", "AIN121", "AIN122", "AIN123", "AIN124", "AIN125",}, scanRate, scansPerRead, 1)

    LJM_eStreamStart(identifier2, {"AIN126", "AIN127", "AIN48", "AIN49", "AIN50", "AIN51", "AIN52", "AIN53", "AIN54", "AIN55",}, scanRate, scansPerRead, 1)

    LJM_eStreamStart(identifier3, {"AIN62", "AIN63", "AIN64", "AIN65", "AIN66", "AIN67", "AIN68", "AIN69", "AIN72", "AIN73",}, scanRate, scansPerRead, 1)

    LJM_eStreamStart(identifier4, {"AIN74", "AIN75", "AIN76", "AIN77", "AIN78", "AIN79", "AIN86", "AIN88", "AIN90", "AIN92"}, scanRate, scansPerRead, 1)

    Then I would read from each one of these streams separately, one at a time.

    Would that work?

    Thank you,

    B

     

     

     

  2. Hi there!

    I'm using a Lua script to control the output of my LabJack T7 to set DAC0 to 5V and DAC1 to 5V using:
     

    MB.W(1002, 3, 5) -- this turns the LED light off by turning the DAC1 to 5V
    
    MB.W(1000, 3, 5) -- TURN DAC0 to 5 V which is used as a reference for the BuckPuck Reference channel

    This works just fine.

    Now what I want to do is to send a trigger from Kipling to DAQFactory to tell it to start recording data.

     

    What is the best way to send a trigger signal from Kipling (Lua script) to DAQFactory sequence script? 

     

    The approach I'm attempting is to set FIO0 channel to 1 using:

    MB.W(2000, 0, 1) -- set FIO0 to 1 to trigger DAQFactory to run its save script
     -- do other stuff here
    MB.W(2000, 0, 0) -- set FIO0 to back to 0 to after the trigger happens

    but, it isn't working.  When I read channel FIO0 in DAQFactory using:

    // Set scans/second.
    private scanRate = 2000
    
    // Set scans/read.  This is how many scans are retrieved per call to the stream read
    // function, and thus controls the iteration rate of the loop below.
    private scansPerRead = scanRate / 2000
    
    // Start the stream with a scan list of AIN0, AIN1, etc.  These are streamable Names from the LabJack Modbus Map, not DF Channel names.
    LJM_eStreamStart(identifier, {"AIN0", "AIN1", "AIN2", "AIN3", "AIN4", "AIN5", "AIN6", "AIN7", "FIO0"}, scanRate, scansPerRead, 1)
    dataIn = LJM_eStreamRead(identifier)
    FIOvalue = dataIn.data.FIO0

    FIOvalue just stays 1.  Even if I try to set it back to 0 in Lua with MB.W(2000, 0, 0) it just stays 1 when I read it in DAQFactory.  Perhaps I'm not using the MB.W function properly?  I have searched for the documentation for the mbWrite function to know what each of the 3 parameters are, but haven't found the documentation yet.

     

    Or perhaps there is a better way to communicate from Kipling Lua script to DAQFactory sequence to trigger events?

     

    Thank you!

    B