Page 1 of 2

Labjack and data collection

Posted: Wed Mar 28, 2012 6:00 am
by mdc2011
Hello,

I am wanting to communicate to multiple Labjack U3-LV, probably every analogue input will be used. Apologies for so many questions, I am a newbie and wanting to learn.

I will be sampling data probably every second.

1.) What is the most efficient way of extracting data? with a single Labjack component in Flowstone and switch the serial numbers, or would it be more efficient to have a seperate Labjack component for each device. Due consideration should be given that I may ask for user input to specify the number of devices connected and ask them for the serial numbers via a setup screen.

2.) Is there a detriment on performance for Flowstone if I connect a floating box direct to the input of the labjack component or should I sample this data using a ticker?

3.) Is it possible to use all 127 device capability at this type of data rate if I use a mains powered usb hub, or am I crazy?

4.) I am also after a robust method of collecting the data into a text file (I have seen the existing data log examples on these forums), I want the minimum number of text files but also I do not want to loose a buffer of data if there is a power cut. Is there a way to append data to a single text file? Is this a flowstone component or would I use Ruby? Any examples would really help.

5.) I'm curious to know how to create a menu system - maybe with pop up windows for settings or messages, also totally switch screens. Again examples would help

Thank you

Re: Labjack and data collection

Posted: Sun Apr 01, 2012 5:16 pm
by Embedded
1) If you have more than one LabJack U3 then you should have multiple U3 components.

2) If you display a number using a Float box it does take more CPU, so only display the things you need in your final version and use the Float Boxes for debugging. If you are only updating at 1Hz then it's not going to be an issue.

3) Depends on your Data rate and your PC power?

4) It's just as easy to reload the file and re-save it.

5) you can use the Selector Module on the V input to a number of screens to create a menu.

Attachments are working again now :)

FYI DSP is a user not DSPRobotics (Admin)

Re: Labjack and data collection

Posted: Sun Apr 01, 2012 5:27 pm
by DSP
I'm here :)

Here's a simple example of a menu selector (using a multiplexer)

Re: Labjack and DO relays

Posted: Sat Jul 28, 2012 12:17 am
by Quentin
I have a question, I have a U3-HV and have the example .fsm going, have data flowing in onto ain0.
I notice that the left column the DO side is whited out and I cannot link to it. In the example there are boolean connectors onto the whited out CIO1, CIO2. I drag an existing arrow away and can't drop it back on either. I know that I have to configure the ports e.g. DO8 if the want to turn the relay on the 8th position, but how to put an arrow onto it? Can anyone help me on this?
Thanks
Quentin

Re: Labjack and data collection

Posted: Sat Jul 28, 2012 5:25 am
by Embedded
The LabJack module is configured by the setup string. Adding some DO elements should activate the digital outs providing they are free and not already allocated.

Re: Labjack and data collection

Posted: Wed Aug 01, 2012 11:28 pm
by Quentin
Thanks embedded,
It's working perfectly now. Getting analog data in and turning relays with DO configured ports. Has anyone been able to make the labjack work in flowstone with digital sensors such as the EI-1050 which labjack sells which is digital temp and humidity. The Labjack windows drivers has specific support commands which are enumerated here:
http://labjack.com/support/ei-1050/datasheet
I don't understand how the I/O config relates to the labjack UD driver commands as described in the datasheet..
Thanks
Quentin

Re: Labjack and data collection

Posted: Thu Aug 02, 2012 8:55 am
by DSP
Since you are using FlowStone I guess you have to talk to this digital sensor manually.

Looking at the data sheet for the temp sensor it uses an SHT11 sensor:

http://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/Humidity/Sensirion_Humidity_SHT1x_Datasheet_V5.pdf

If you look at the data send receive section (3.00) you have to use a digital out and a digital in to communicate with the sensor combined with a second digital out to synthesize the clock. There is no minimum frequency for the clock so you can easily make your own state machine in FlowStone to handle this.

I would recommend using the Ruby Module in FlowStone to create the data and clock signals with actuate timing using the Ruby 'time' (t) feature.

Example:
Ruby State Machine.fsm
(737 Bytes) Downloaded 1390 times


In the example I have just made the data toggle true and false you will need to program the data to send the correct data according to the data sheet and then also read in the returned data.

If you want a simpler solution just connect an analogue thermocouple to an analog input and read off the temperature as an analogue voltage.
Phidgets make a Temp/Humidity board that has analogue outputs so you could connect this to the LabJack U3:
http://www.phidgets.com/products.php?category=6&product_id=1125_0

Re: Labjack and data collection

Posted: Thu Aug 02, 2012 9:22 pm
by Quentin
Hey, thanks again for the great info.. I am going to take both suggestions- I ordered some analog temp/humid sensors and I am using your piece of ruby code to start wrapping my head around the process of getting data out of the digital sensors which I have.
Cheers
Quentin

Re: Labjack and data collection

Posted: Mon Aug 06, 2012 10:40 pm
by Tronic
DSP wrote:I would recommend using the Ruby Module in FlowStone to create the data and clock signals with actuate timing using the Ruby 'time' (t) feature.

This feature is not present in the free version?

Re: Labjack and data collection

Posted: Thu Aug 09, 2012 1:55 pm
by DSP
Yes it is?

You can have one Ruby Module in the FREE version, which is enough?