Search the Community

Showing results for tags 'u6'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • DAQFactory
    • Alarming
    • Channels, Conversions and general data acquisition
    • Graphing
    • Logging
    • Modbus
    • Networking: web, email, FTP etc.
    • PID
    • Screen Components and User Interface
    • Sequences and scripting
    • Serial Communications
    • General DAQFactory
    • DAQFactory and the LabJack
    • DAQFactory Express
    • DAQConnect
    • DAQFactory New Feature Requests
    • The DAQFactory Guru's Articles
    • DAQFactory Newletters

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 7 results

  1. Hi everybody, Is there a way to assign a resolution index to a variable? For example: using("device.LabJack.") include("c:\program files\labjack\drivers\labjackud.h") AddRequest(0,LJ_ioPUT_CONFIG, LJ_chAIN_RESOLUTION,11,0,0) GoOne(0) x = “something” // this assigns resolution index (11) to x Best regards! Dacfactory version Base 5.87a (Labjack U6-pro)
  2. Hello all, I'm trying to measure a 0-40mV signal with a differential setting using channels AIN2 and AIN3 in addition to measuring a 0-5V signal on AIN1. I've read tutorials but can't seem to get my 100 gain setting for channels 2 and 3 to work, the output I'm getting doesn't seem to be multiplied by 100. I pulled the following code from a combination of tutorials, could someone troubleshoot this? From https://labjack.com/support/datasheets/u6/high-level-driver/example-pseudocode/analog-inputs //Configure all analog inputs for max resolution. Like most //settings, this will apply to all further measurements until //the parameter is changed or the DLL unloaded. AddRequest (lngHandle, LJ_ioPUT_CONFIG, LJ_chAIN_RESOLUTION, 12, 0, 0); //Configure AIN1 for +/- 10 volt range. AddRequest (lngHandle, LJ_ioPUT_AIN_RANGE, 1, LJ_rgBIP10V, 0, 0); //Configure AIN2 for +/- 0.1 volt range. This applies to any //reading, single-ended or differential, where the positive //channel is AIN2. AddRequest (lngHandle, LJ_ioPUT_AIN_RANGE, 2, LJ_rgBIPP1V, 0, 0); //Request a single-ended read from AIN1. AddRequest (lngHandle, LJ_ioGET_AIN, 1, 0, 0, 0); //Request a differential read of AIN2-AIN3. AddRequest (lngHandle, LJ_ioGET_AIN_DIFF, 2, 0, 3, 0); //Request a single-ended read of AIN2. Here we use the DIFF //IOType, but pass x1=199 which does a single-ended measurement. AddRequest (lngHandle, LJ_ioGET_AIN_DIFF, 2, 0, 199, 0); //Execute the requests. GoOne (lngHandle); //Since multiple requests were made with the same IOType //and Channel, and only x1 was different, GetFirst/GetNext //must be used to retrieve the results. The simple //GetResult function does not use the x1 parameter and //thus there is no way to specify which result is desired. //Rather than specifying the IOType and Channel of the //result to be read, the GetFirst/GetNext functions retrieve //the results in order. Normally, GetFirst/GetNext are best //used in a loop, but here they are simply called in succession. //Retrieve AIN1 voltage. GetFirstResult returns the IOType, //Channel, Value, x1, and UserData from the first request. //In this example we are just retrieving the results in order //and Value is the only parameter we need. GetFirstResult (lngHandle, 0, 0, &dblValue, 0, 0); //Get the AIN2-AIN3 voltage. GetNextResult (lngHandle, 0, 0, &dblValue, 0, 0); //Get the AIN2. GetNextResult (lngHandle, 0, 0, &dblValue, 0, 0);
  3. steveandrews

    Device Error Handling

    Hi, I want to catch the device errors thrown by Daqfactory when a labjack is disconnected or not present on startup. I have some startup code that autoruns and initiates the labjack etc. I want this code to try to communicate and catch the device error if no labjack is present and display a message box saying the labjack should be plugged in etc. Then when the message box is 'ok'd', it tries to run the startup sequence again. I also want to catch the error when it's disconnected whilst running, although in this case it will reconnect automatically but I would stop a sequence running and display a message. The error code is D0050:01:1007 for no labjack found - i assume the 01 is the device number and the last 4 digits the unique code. It's 1015 for labjack disconnected. I know how to catch 'C' errors and display messages etc. I have tried catch("D0050") and catch ("D0050:01:1007") with no luck. Any tips? Cheers Steve
  4. HI. Does anyone know how to change the settling factor of the Labjack U6 pro from within Daqfactory? Probably through a 'sequence'. What should be written in the sequence? Thanks
  5. Hi, I am trying to display 2 different values from the same input in DF. Using 2 different channels, one of them has the built in 'Conversion: Thermocouple' selected and the other does not. I want to display the converted temperature reading and the raw voltage reading at the same time using the built in converter equation for the temp channel. However, when this is implemented, the channel that does not have the conversion selected is automatically converted to the temperature value. Is there a way around this that would easily let me display both values without hard-coding the conversion equation. -Using DF 5.91 with a Labjack U6-PRO and a type J Thermocouple. In picture the 2 channels in question are RAWVOLTAGE and Temperature.
  6. The Overall Question: Is there a difference in how DAQFactory or the Labjack hardware assigns timestamps during streaming vs. command/response mode? For example, if I were to record a single square wave input (20 Hz) on two different labjacks, one streaming data and the other using C&R with both labjacks collecting data at the same frequency (250 hz), would I not only see the same frequency square wave but have the square waves line up fairly close to each other (within 1/250 s) if I were to plot them using the data and respective timestamps provided by each labjack? The Context: I'm currently streaming data from one Labjack U6 (let's call it LJ1_stream) and using command/response to collect data on another U6 (LJ2_CR). The reason for this is that a) I need 6 timers, hence 2 different labjacks and one of the timers is to record a rotary quadrature encoder that rotates too quickly for streaming (due to the 1 edge/33 usec processing limitation). Therefore, 4 rotary encoders using duty cycle timing (mode 4) are read by LJ1_stream and 2 quadrature rotary encoders using quadrature timing (mode 8) are read by LJ2_CR. I've set the streaming to 250 hz and the C&R timing to 0.004 seconds (which I realize is faster than recommended for C&R and could be part of the issue as discussed further below) to also provide 250 hz measuring. A common 20 hz square wave generated by a function generator is also being recorded on both labjacks, as well as an experiment start signal and a valve command signal, which both start low and go high when respective buttons are pushed. Data is collected and exported (not logged) using expressions of the form Channelx_Data[Experiment_startTime,Experiment_endTime] where Experiment_startTime = systime() at the beginning of the experiment based on a button press and similarly for Experiment_endTime. The data from LJ1_stream and LJ2_CR are exported as two separate export sets, with All data points (aligned) and zero align threshold. Channel histories are 3000 for LJ1_stream and 4000 for LJ2_CR, since my experiments only run for ~2-3 seconds at a time. LJ1_stream, in addition to the 8 channels being occupied by the four timers and the three common digital input signal channels, also has 5 analog signal channels and one other digital input, for a total of 17 streamed channels. According to the 50000 max sample rate, 17 channels should correspond to a max scan rate of 2941, or a minimum of 0.00034 seconds between scans, so running at 250 hz should be slow enough. LJ2_CR has the 4 channels for the 2 quadrature timers, and the three common digital inputs. The Detailed Problem: There are experiments where the common signals are being recorded at very different timestamps from LJ1_stream compared to LJ2_CR. For example, in one experiment, the experiment start signal went high at -0.193 seconds on LJ2_CR vs. at 0 for LJ1_stream (obviously using the LJ1_stream experiment start signal time as the basis for subtracting the DAQFactory time into useable time for both LJ1_stream and LJ2_CR). There are other experiments where the effect is less pronounced, but still off by >2 timesteps (e.g. experiment start signal goes high at +0.009s on LJ2_CR but is recorded at 0 for LJ1_stream). Some Thoughts: 1) Running LJ2_CR at 250 hz is too fast? According to the labjack specifications (sec 3.1 and 3.2 of labjack U6 manual), one complete scan of 6 channels (2xquadrature timers and 2 digital inputs) in C&R mode would take about 8.5 ms, which corresponds to roughly a max record rate of 117 hz. However, in examining the quadrature encoder data recorded at 250 hz using C&R on LJ2_CR, there doesn't appear to be any major issues other than some occasional data dropouts that occur. The data still looks fairly smooth and uninterrupted. Is it possible that the timer channels are recorded more accurately because they're interrupt driven rather than the digital signals (are they polled?)? 2) Is this an issue with using export rather than logging? Any other suggestions or thoughts would be greatly appreciated as to why timestamps aren't lining up, and I'm happy to clarify anything as I realize this is a very specific and detailed question that may not be as applicable to the general public.
  7. Hi all, I'm running into an issue when streaming 9 channels (4 pairs of duty cycle timer channels to record 4 rotary encoder signals, and 1 channel to capture EIOFIO) on my U6. At low scanrates (scanrate = 1000), everything works fine. However, at higher scanrates, say, >3000, I've seen behavior that I can't quite figure out. At the higher scanrates, if I leave DAQFactory collecting data, everything works well in the beginning. However, after a random amount of time (I think it's random since I haven't found a pattern or correlation to any other factors yet) the data abruptly starts to go haywire. It looks as though data is being put into the wrong channels - e.g. Channel224 data starts showing up in Channel201, etc. No data is showing up in the proper channels. You can see the channels shifting as well, as after another random amount of time, the data being displayed with shift, again with channels being expressed in different ones. All the data shifts simultaneously, as in, all the channels will suddenly swap with one another in an undiscernable pattern. However, once I stop the streaming and restart data collection, everything is fine again, until after an unspecified amount of time, the data will again go haywire. I'm tracking the backlog, and it isn't near the 100000 sample backlog (at most around 6000 samples). I've checked the physical hardware signals being input, and they aren't changing, so I know it's not the signals being input to the Labjack. I've tried swapping with different U6's and gotten the same behavior, so unless this is a hardware issue with U6's in general, it's at least not localized to a single piece of hardware. I've also checked to make sure that my scanrate is under the acceptable limits. With 9 channels, at 50,000 samples/sec max, yields 5556 scans/sec, so <5000 scans/sec should be fine. Also, the encoders output PWM at 244 hz, which translates to roughly 2 edges every 0.004098 s, which means with 4 encoders I'm getting at most about 1952 edges/sec, which is well below the 7000 edges/second limit specified for streaming timers in Appendix A. Has anyone seen similar behavior? Is this a DAQFactory streaming issue, or a hardware/driver interface issue with Labjack? Any thoughts would be greatly appreciated!