LabJack Support

Members
  • Posts

    89
  • Joined

  • Last visited

Everything posted by LabJack Support

  1. So would the conversion be something like: 10 * (Value[0] - Value[1]) ?
  2. Sounds like you are using a unipolar range, and you want the bipolar +/- 5 volt range. You need a request to set the range of that analog input channel to bipolar 5 volts. You can see this in the pseudocode near the end of Section 4.3.3 of the UE9 User's Guide. In the stream example, add the following request to the Start_Stream sequence. It can go anywhere before the GoOne call, so just make it the first line of the sequence: Device.LabJack.AddRequest(Var.d_number,"LJ_ioPUT_AIN_RANGE", 0, 3, 0); This is saying that you want to set the AIN range, on channel=0, to value=3. You can see from the labjackud.h header file that 3 is the constant for bipolar +/-5 volt range (LJ_rgBIP5V=3). You should be able to use the string LJ_rgBIP5V, which is more readable, but this does not work in older versions of DAQFactory so just use 3.
  3. I am also a fan of the multiplier idea. Even graphs with 2 different y axes start to get confusing, but any more than that sounds pretty complicated. I prefer to apply multipliers to different channels and then I actually name them as such, so instead of labeling a channel on the graph "Temperature" I might label it "Temperature*100".
  4. You can program power-up defaults for digital directions and states and analog output values, but not for the analog/digital configuration or timer/counter configuration. The typical way to handle this would be to have an error handling routine the attempts to reconfigure when it gets certain errors. What software are you using?
  5. I don't understand what you are saying. Here is a list of what I can think of that you need to do: StartUp Sequence - Add another variable such as "period2". Config Sequence - Change Timer0 mode to 2. Don't need command setting Timer0 value. Read Sequence - Add requests to read and reset Timer0. Add a getresult to get the Timer0 value and put it in period2. Main Page - Make a display for period2.
  6. Why are you using 2 timers to measure 1 RPM? I looked at our example and it looks like only Timer1 is used to measure frequency. Timer0 is used to generate PWM output.
  7. What program are you using to do the logging?
  8. Do you get an error when you run? I get the following: "The device's hardware version doesn't support the value parameter for this request" The most common cause of that error is using the wrong timer clock base. In this case, it looks like you are using the device configuration wizard and it is setting the clock base to 24 MHz w/ divisor which is not valid on hardware revision 1.21. The plan was to make 2 different versions of many examples. One that is mostly sequence based and one that uses as few sequences as possible. One advantage of the sequence based examples is that they better following the UD programming reference in Section 4 of the U3/UE9 User's Guide. A U3 timer/counter pin offset value of 4-8 is recommended for future compatibility, so we are trying to change all examples to use a value of 4.
  9. Based on that, I think the period measurement timer will work great for you as configured in the example. With a counter you would have to count for a while to get many pulses at 25 Hz max, but with the timer you can read the period of every pulse if you feel like it. One possible advantage to counting, is that you could use a timer in the "firmware counter with debounce" mode, if you wind up having a problem with switch bounce. If you have bounce issues and want to use the timer, you will have to clean up the signal with an RC filter or other external hardware as mentioned in Section 2.8.1.3 of the U3 User's Guide.
  10. No, you can often use a timer instead of a counter. The decision comes back to a lot of the stuff discussed in topic #1105. To help you decide the best method, we would need to know more about the following: What is the frequency range of your signal? Over what time period do you want to measure the frequency? A single cycle, 1 second average, 10 second average? What is the duty cycle of your pulse and is it positive or negative?
  11. Did you have problems with the example attached above? It should count and time pulses. Looking at that example, I think two quick changes could be done to give you RPM. For the period timer, take 1/(microseconds*0.000001) to get Hz, and then multiply by 60 to get RPM. For the counter, it looks like the example is doing a reset & read once per second, so the value you get each second is Hz. Multiply by 60 to get RPM. Make sure you look at Section 2.8.1.3 of the U3 User's Guide since you are connecting to a mechanical switch and might need to worry about bouncing. Also see the following general topic about frequency measurement: http://www.labjack.com/forums/index.php?showtopic=1105
  12. It appears you are having trouble attaching files. Here are a few things to try: 1) Zip up your file. 2) After browsing and selecting the file, make sure you click the add attachment button before you submit your post. After you click add attachment, you should see your draft, still in edit mode, but you should see that it shows the file attached towards the bottom. 3) Try a different browser. We all use current versions of Firefox.
  13. Have you upgraded to the latest version? If using DAQFactory Express go to daqexpress.com. If using other version of DAQFactory go to daqfactory.com.
  14. Try starting with the attached example. U3_Timers_Counters_Sequence.zip