LabJackSupport

Members
  • Content Count

    102
  • Joined

  • Last visited

Community Reputation

0 Neutral

About LabJackSupport

  • Rank
    Advanced Member

Recent Profile Visitors

8,487 profile views
  1. The modbus write function is documented here: https://labjack.com/support/datasheets/t-series/scripting/labjack-library 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. https://labjack.com/support/datasheets/t-series/lua-scripting
  2. To talk to an EI-1050 through a U3 requires special function calls as described in "UD Library Communication" here: https://labjack.com/support/datasheets/accessories/ei-1050 Have you tried "EI1050 U3.ctl"? https://labjack.com/support/software/examples/ud/daqfactory
  3. 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). https://labjack.com/support/app-notes/Controlling-Relays 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." https://labjack.com/support/datasheets/accessories/rb12
  4. 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)
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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: https://forums.labjack.com/index.php?showtopic=1105 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: https://labjack.com/support/datasheets/u3/hardware-description/timers-counters For an NPN signal you should be able to just connect to a DIO and GND as shown in Figure 2 here: https://labjack.com/support/app-notes/open-collector-signals
  11. 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: https://labjack.com/support/app-notes/Controlling-Relays
  12. 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): https://github.com/labjack/I2C-AppNotes/blob/master/LJM_Library/I2C_Abstraction_Layers/lua/Lua_I2C_Utils%20.7.lua 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: https://github.com/labjack/I2C-AppNotes/tree/master/LJM_Library. 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.
  13. 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. https://labjack.com/support/datasheets/u3/hardware-description/timers-counters/timer-mode-descriptions/period-measurement-32 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.
  14. The Ebay sensor you linked looks interesting because it runs off of 5 volts which you can get from the U3. It does not tell us how much supply current it needs, but I would think a sensor like this draws less than 50mA which is no problem for the U3 to provide from its VS terminals. (Note: The 200mA spec is likely the maximum current the PNP output switch can source.) The output is PNP, rather than the preferred NPN, so you will need to add a 4.7k pull-down resistor: https://labjack.com/support/app-notes/open-collector-signals At 900 RPM you are only getting 15-30 pulses per second. That might be enough to use a counter, but using a timer to measure the period of each pulse is a more likely solution: http://forums.labjack.com/index.php?showtopic=1105
  15. The choice of rotation speed sensor is going to be impacted by your physical constraints, but any sort of encoder or sensor that gives you one or more pulses per revolution should be pretty easy to deal with. If you find some of interest post links to technical details and we can take a look. As for the load cell, to use one with the U3 you need an instrumentation amp such as the LJTick-InAmp: http://forums.labjack.com/index.php?showtopic=4376 https://labjack.com/support/datasheets/accessories/ljtick-inamp/appendix-d