All Activity

This stream auto-updates     

  1. Last week
  2. AzeoTech

    Zeroing data with zeroPoint

    For what? You don't learn without making a few missteps!
  3. Dobbeljoe

    Zeroing data with zeroPoint

    Dear Guru, I apologise.
  4. AzeoTech

    Zeroing data with zeroPoint

    You started to go down the right path, but didn't. You need three variables, like the ZeroPoint1, ZeroPoint2, and ZeroPoint3 you declared in your SetGlobalZero sequence, which apply to each of the three lasers. You created these and also ZeroPoint, but then used the same ZeroPoint variable for all three lasers.
  5. Dear, I have a test set-up with 3 lasers to measure the distance between the lasers and an object. I want to measure the actual distance and also the change of distance over time. Therefore I want to zero the data of all three lasers. I use 'zeroPoint' for this. I would expect that I can create three 'zeroPoints' (e.g. 1,2 and 3), one for each laser. But it seems that I can use only one 'zeroPoint', meaning that the same value is subtracted from the data of all three lasers. How can I set the zero for each individual laser? Below is a screenshot of the page that is relevant (page 2). I also attached the prototype of the DF application so it is hopefully more obvious what I am trying to explain here. Laser Kruiptest English v5.ctl
  6. Earlier
  7. If the sequence doesn't run all the way through then there is likely an error and a corresponding error message in the command / alert window. Moving the script to an event won't likely eliminate the error, so you should probably chase that down.
  8. I tried using a separate sequence to do that but for some reason it wouldn’t work correctly. Seemed like the sequence would get kicked out at some point and not execute the rest of the lines. By that I mean, I would watch the sequence in the workspace and the black line showing the sequence running would disappear before it was finished. Tried a few different things and couldn’t figure out why. Thought a channel event might work better.
  9. Yes, you can do that but you have to be careful. Just remember that the script in the channel Event runs in the same thread as the Timing loop so any delay in executing the script could affect your timing. For example, if you have your input channel timing set to 0.02, and you do the LJTic_DAC command and that takes 0.03 seconds, then your input channel will only read at every 0.03 seconds since it was tied up adjusting the LJTic_DAC. That is why it is sometimes better to have a secondary loop in a sequence watching the input and tweaking an output separately. That all said, in your case, you are probably fine...
  10. hello Is it possible to use the event of a channel to control my LJTic_DAC? I have a 60 tooth wheel and want to rotate it 140 teeth. if I use an if statement in event with appropriate LJ command, will that work? Im using rawcounts channel to count.
  11. LabJackSupport

    Speed/time measurement

    The issue may be to do with the maximum measurable time using your timer settings. As I had the example set up (using a 1MHz clock) the maximum time between edges is 65535/1000000 = 65ms and the resolution is 1/1000000=1 microsecond. There is a tradeoff between maximum measurable time and resolution depending on your timer clock frequency. Note that you must update the global variable clockFreq if you update the timer clock settings. Our timer documentation and pseudocode have additional information about the line to line feature and available timer clock settings: https://labjack.com/support/datasheets/u6/hardware-description/timers-counters/line-to-line-measurement https://labjack.com/support/datasheets/u6/high-level-driver/example-pseudocode/timers-counters
  12. Dobbeljoe

    Speed/time measurement

    Thanks for the support. I tried out the example you sent me. I have connected my top sensor to FIO0 and my bottom sensor to FIO1. When an object passes the top sensor, the time display stays at 0 seconds, which is good because the timer should now start at the falling edge produced by the top sensor. When the object passes the bottom sensor, the display shows a very low value, even if the object (in this case my hand) passes the bottom sensor seconds after it passes the top sensor (see figure). In fact, even if my hand only passes the bottom sensor, a value is shown (again a very low value). In this case the timer should not be started at all. It seems that the timer is started by the bottom sensor (FIO1) and also stopped by the same sensor. It looks as if the time duration of the falling edge (from high to low) is measured and displayed.
  13. AzeoTech

    Syntax for direct one-step casting

    First problem is that DAQFactory won't support a 64 integer in general. All numbers in DAQFactory are stored as 64 bit floating point values (double precision floating point) which basically gives you 52-53 bits of integer. The rest is exponent. So, really to read 64 bit integers you need to split it into two 32 bit values and process them that way. Moving on, you can pretty much do what you are asking with relatively simple bitwise math. For example, to get just the least significant 16 bits of all values in an array, it is just: array & 0xff To get just bit 37 (numbered from 0): array >> 37 & 0x01
  14. It would be cool (my apologies if this already exists) to have compact syntax to directly extract a smaller size value from a variable/channel value without having to do an inline To.Bit() or whatever, and also to aggregate multiple consecutive values in an array as a larger type. For example, if MyVariable is 64-bit, MyVariable:UW0 might return the most/least significant 16 bits, interpreted as an unsigned word. MyVariable:37 might be the 37th least significant bit, and so on. As a delimiter, I'd suggest a period or a colon if available. If you had an array of smaller values, even if stored in 64-bit registers, you might be able to cast two consecutive ones into a single 64-bit value, interpreting each of the individual registers as 32-bit. This is probably less useful than the other application, in a DAQ Factory context, where all numbers are automatically stored as 64-bit.
  15. Terry

    HOA Switch

    Thanks for your help and patience. I was able to add this to my CTL file and it's functioning on my screen. Now to try incorporating it into the "auto" channel event.
  16. LabJackSupport

    Speed/time measurement

    Apologies, the LJControlPanel issue seems to be an oversight. We will look into adding that support. In the meantime, I made a quick example demonstrating the line-to-line setup in DAQFactory. LineToLine.ctl
  17. AzeoTech

    HOA Switch

    Yes and no. There isn't a built in HOA switch, but you can easily create your own using symbols from the Symbol Factory (or any other image you want to use). I've attached a sample showing it. It is made of 4 components to provide labels. The main component is a symbol component that contains three symbols, one for each possible switch position. Which is displayed is determined by the HOA channel. Clicking the symbol steps through the options, Off then Hand then Auto then back to Off. There are then 3 labels for each of the positions. If you click on the label it will jump to that state. You can, if you expect to use the switch a lot, group it and basically make your own component out of it. I would likely add script to allow for changing of the output channel, but that is a bit more involved. If you are only going to use a few of these, you can just copy and paste the four components and manually change it. hoaSample.ctl
  18. Terry

    HOA Switch

    Thanks for your help. So if I understand correctly, there is no animated symbol that rotates between left, up, and right like a real HOA switch, and I have to, for example, place three separate symbols on the screen showing the L, U, and R positions configured to produce the H, O, and A actions when each is pressed?
  19. Dobbeljoe

    Speed/time measurement

    I have been experimenting with the Labjack U6. In the documents, the line-to-line measurement requires mode 14 for both timers. Unfortunately there are only 13 modes available in the mode menu of panel 'Configure Timers and Counters' of the U6 Test Panel. The line-to-line measurement mode seems to be missing.
  20. Dobbeljoe

    Speed/time measurement

    Thanks for the fast reply. I plan on using a Labjack U6. I am happy to read that it should be possible to measure such short intervals. I am going to try to follow the Labjack tutorials on this topic. At first glance it seems rather complicated. So far I have only limited experience with DaqFactory.
  21. AzeoTech

    HOA Switch

    Use a single Symbol component and add the three images, giving each image a different threshold depending on your coding. I recommend 0 for off, 1 for hand and 2 for auto. Then in the action, if you just want to step through the states put script like this (assuming "hoa" is the variable/channel with the hoa status): private temp = hoa+1 if (temp > 2) temp = 0 endif hoa = temp
  22. Terry

    HOA Switch

    Just getting back into this after the holidays. I'm using Pro 19.1. 3 images to create a 3 position switch? What do you mean? Do you somehow lay the images on top of each other? How do you make this a 3 position switch?
  23. LabJackSupport

    Speed/time measurement

    We support line-to-line timer features for both UD and T-series devices that should be able to achieve your goal. Please see the documentation for your given device below and let us know if we can help with anything further. For UD devices: https://labjack.com/support/datasheets/u3/hardware-description/timers-counters/timer-mode-descriptions/line-to-line-measurement For T-series devices: https://labjack.com/support/datasheets/t-series/digital-io/extended-features/line-line
  24. AzeoTech

    Speed/time measurement

    First what hardware are you using? If you are using a LabJack you can use on of their timer modes to achieve this, though you may need to add a latching circuit, something so that the first sensor latches the output high, then the second sensor brings it back low. But the folks at LabJack will know how best to do this hardware wise. You won't be able to do this without using a hardware mode due to the extremely short time frame.
  25. I want to measure the speed of an object. The object passes two optical sensors, causing the output of the sensors go from high (~10 Volts) to low (~0 Volts) and back again. In order to measure the speed I would like to measure the time between the two respective falling edges of the signals coming from the two sensors. I want to start the measurement at the first falling edge and stop it at the second falling edge. In the worst case the time between the two edges is extremely short, i.e. some microseconds. I am thinking to measure/count the clock pulses between the two events, or perhaps count the number of data points, providing that I can measure and record at a very high sampling rate. Does anyone have an idea how to achieve this?
  26. That’s fine. Didn’t know that. Still learning. Thanks for all the great advice.
  27. Why wouldn't you just display the result of the stream? Just do [0] on it. It will update with every stream block which is several times a second.
  1. Load more activity