• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About LabJackSupport

  • Rank
    Advanced Member

Recent Profile Visitors

9,004 profile views
  1. LabJackSupport

    addressing LJ-TickDACs on a T7 Labjack

    Our DAQFactory for LJM page is chock full of nuggets so I would go through it thouroughly, and take a good look at the LJM_Basic.ctl example that demonstrates many key things. Per AzeoTech's point about using a DF Channel you can find info here: Per AzeoTech's point about DF taking care of Handle, the following hints at that: ... and then does not seem to be clearly stated, but you can see the example script is passing an LJM identifier as the first parameter:
  2. See "Opening a Device" here: DAQFactory's D# is the Identifier parameter passed to the open call: "To specify an identifier, use a serial number, IP address, or device name." With USB, serial number would be the common choice to pass.
  3. The modbus write function is documented here: I don't spot anything wrong in your calls to set FIO0 to output-high and output-low. Check out the Lua example "Toggle DIO 1Hz". We can continue troubleshooting that, but my approach might be a little different. How about using USER_RAM0_U16 and having the Lua script increment it when desired. Then DAQFactory can read that register and note if it has changed from the previous value. That way you never miss a trigger.
  4. To talk to an EI-1050 through a U3 requires special function calls as described in "UD Library Communication" here: Have you tried "EI1050 U3.ctl"?
  5. LabJackSupport

    Solenoid valve control

    The comment you are seeing in LabJack forum topic is about directly controlling a solid-state relay (SSR), which is best done using "sinking" control. When you do that you need to change the DIO between input (relay off) and output-low (relay-on). With the RB12, however, you just change the DIO between output-high (module off) and output-low (module on). The following is from the RB12 Datasheet: "The RB12 behaves with inverted or negative logic. For output modules that means the applicable LabJack DIO must be set to output-low to enable the I/O module. Output modules will be disabled with the DIO set to input or output-high."
  6. LabJackSupport

    I2C Questions

    We discussed this issue today as a group and noticed one other potential issue. It doesn't look like you properly define your "numWrite" or "array" variables. There is a chance that you could be instructing DAQFactory to write no bytes to the device instead of two. You can easily test this by modifying the line: AddRequest(ID, LJ_ioI2C_COMMUNICATION, LJ_chI2C_WRITE, numWrite, array, 0) to be: AddRequest(ID, LJ_ioI2C_COMMUNICATION, LJ_chI2C_WRITE, 2, array, 0)
  7. LabJackSupport

    I2C Questions

    It looks like your device isn't receiving an "ACK" from your I2C slave sensor so the I2C packet is failing. Can you double check the slave address and make sure that you have pull-up resistors installed? In our I2C app-note we recommend 4.7k resistors. If you haven't already tried switching to the EIO0 and EIO1 ports, please do that as well.
  8. LabJackSupport

    Duty Cycle of Clock pulse measurement T7

    Sounds like once per second you want to read a value that is the total duty cycle of a waveform over that last second. So if the signal was high 50 ms, low 450 ms, high 150 ms and low 350 ms, you would get a reading of 20% for that 1 second. The duty-cycle measurement timer mode measures every cycle, not the overall duty cycle of some time period, so that will not do what you describe. The only way I can think of to do it in hardware, so DF can read the value once per second as you describe, would be to write a Lua script that measures the percent on of each second and puts that value in user-ram. Sounds like a fairly easy script.
  9. LabJackSupport

    Hall Effect Current sensor / transducer

    I took a look at the ACS712 and have 2 comments: 1. The nominal offset is half the supply voltage. If the supply voltage is exactly 5.0, then the offset will be 2.5, but if you are using VS to power the sensor you should read back the actual value of VS in real time and use that in your math rather than assuming 5.0. 2. The nominal sensitivity is 66 mV/A, which means a swing of +/-1.98 volts, not +/-2.5 volts.
  10. LabJackSupport

    Newbie.. Counting Pulses every 10 seconds

    A simple option for a long interval like this is to simply use DIO#_EF_READ_A_AND_RESET (rather than DIO#_EF_READ_A) and tell DF to only read that register every 10 seconds. The classical solution is to read DIO#_EF_READ_A as often as you want, but store historical values so whenever you want to display a 10 second count you subtract the count from 10 seconds ago from the current count.
  11. LabJackSupport

    Labjack U6 100 Gain for Differential Channel

    Each range on the U6 is individually calibrated. When the calibration is applied you get actual volts, not volts * 100.
  12. 10 ppr and 10000 rpm gives you about 1667 pulses per second, so you can use a counter or a timer. See the following for an overview: First try them in the test panel in LJControlPanel. I suggest you try out a simple hardware counter, and also try the 32-bit period input timer: For an NPN signal you should be able to just connect to a DIO and GND as shown in Figure 2 here:
  13. In terms of hardware, are you using a relay to switch the fan on and off? See the following app note and do initial testing using the test panel in LJControlPanel before you try to automate using DAQFactory:
  14. You want to use the "USER_RAM" registers. They are documented on scripting section of the T7 datasheet about half way down the page. Below the register descriptions is a short lua script example that reads from the USER_RAM0_F32 register (address 46000) and writes to the USER_RAM1_F32 register (address 46002). I highly recommend checking out the I2C_Utility script that we have for Lua (currently only posted to github, and released with the latest beta installer on our website): The script (with no modifications) will search for any available slave addresses where the SDA line is DIO12 (EIO4) and SCL line is DIO13 (EIO5), look at line #92 to re-configure this. We have several I2C examples that use the I2C utility that you can look at for examples: All of the .lua examples should read data from the designated sensor and post some data to user ram registers. The IO-Expander example uses a few registers as "input" registers.
  15. I don't see any obvious in your CTL (but it might have extra stuff you don't need). It looks like it is configuring a 32-bit period timer on FIO5. If you don't need the PWM, perhaps get rid of that and just use the default clock configuration and just go with your 1 period measurement timer on FIO4. If you have not already, you want to test your timer first using the test panel in LJControlPanel. In the test panel, I suggest just the following 2 changes to the defaults to enable your 1 input timer on FIO4: # of Timers Enabled = 1 Timer 0 Mode = RISINGEDGES32 If that works with your signal, you can then go to "config defaults" in LJControlPanel and do these same settings and save them as the power-up default for your device. Then power cycle the U3 so they take effect. Now you don't need to do any configuration in DAQFactory ... just read the timer value.