Sampling data


Richards

Recommended Posts

The start sequence tells the LabJack to start streaming.  It then stops running because the LabJack has taken over and will send data as it becomes available.  The stop button / sequence sends a separate command to the LabJack to stop the streaming, at which point the LabJack stops sending data.  When the streaming is running, the yellow LED on the LabJack should blink rapidly.  

Just to be sure, you are using a U3 / U6 or UE9 correct?  Not a T series or U12?

Link to comment
Share on other sites

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

I want to stream ''FIO4'' channel in that command: AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 3, 0, 0, 0)

i have replace #3 by #4 and it does not work.

I have a lot of noise streaming my 2 channels ,since i have a high conversion value, it increase the signal

and the noise at the same time, should it be better to amplify the signal at the source, or is there a way to filter

that signal.

Link to comment
Share on other sites

You also need to change/add the channel in the channel table to receive the data.

It is usually best to first try and resolve the noise in hardware before addressing it in software.  You can easily address noise in software by oversampling (reading faster than you need) and then averaging the data, but this should only be done after you have addressed the noise in hardware as best you can as it can mask real problems.

Link to comment
Share on other sites

You'll want to ask the folks at LabJack about what channel #'s you need to use to stream FIO.  It isn't 1 to 1.  The 0's after the 3 aren't used for that particular command.  The UD uses a generic AddRequest() function that can take up to four numbers.  Only certain commands require those extra numbers, but you need to provide 0's even if not used.

Link to comment
Share on other sites

See the channel mapping in the following documentation:

https://labjack.com/pages/support?doc=/datasheets/u3-datasheet/261-channel-numbers-u3-datasheet/

With the flexible IO such as FIO4-7, you should also ensure each line is set to analog input before trying to read them as analog inputs. That is done using the LJ_ioPUT_ANALOG_ENABLE_PORT or LJ_ioPUT_ANALOG_ENABLE_BIT IOTypes. See the following related pseudocode:

https://labjack.com/pages/support?doc=/datasheets/u3-datasheet/412-configuration-u3-datasheet/

Link to comment
Share on other sites

As you explain me in a earlier tread how to tare the load cell:

global tareOffset = 0

Then create a conversion for your weight channel:

Value - tareOffset

Then apply that conversion to your weight channel.

Finally, in your button for setting the Tare, create a Quick Sequence action and put:

tareOffset = (myWeightChannel + tareOffset)

 

It work good when i graph at low speed.

When i stream , it does not show anything on the graph

except if i remove the '' tareOffset'' in my conversion channel.

But then the tareOffset does not work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.