Sampling data


Recommended Posts

In order for DAQFactory to run in Express mode, you have to include the -runAsExpress flag at startup.  You can put this in your shortcut (see the one we install).  It must go before any .ctl file you list:

c:\daqfactory\daqfactory.exe -runAsExpress "c:\myfiles\myfile.ctl"


Link to comment
Share on other sites

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

If you name the graph (select it, right click and select Component name), then yes.  Let's assume you named it "MyGraph":

component.myGraph.XAxisFrozen = 1

Set that to 0 to unfreeze it.  There is a corresponding one for Y, but unless you have the Y axis scaling set to an expression, it isn't really necessary.

Link to comment
Share on other sites

OK, got it this time.  A number of comments:

1) your Force Conversion has a syntax error.  You have:

Value * 1695 - Value tareOffset

Which makes no sense since there is no operator between Value and tareOffset.  You need to remove the second Value:

Value * 1695 - tareOffset

2) Your Start button Action has a syntax error.  You put two commands on one line.  The two clearHistory() commands need to be on their own lines.

3) your Force and Velocity channels that you are graphing in an XY graph have different Intervals.  DAQFactory will do alignment, but it is better to simply acquire the data for both channels at the same rate.

3) Instead of trying to freeze the graph, I would simply have a sequence do the acquisition.  Do this:

a) put your force and Velocity into a group called Input.  (They are in Main now) and set their Timing to 0.

b) create a sequence called, say PollSensors with this script:

while (1)

c) change the Start button sequence to:


d) change the Stop button sequence to:


This will cause it to only acquire data when pollsensors is running, so when you hit stop it will stop reading the inputs and thus stop updating the graph.  This is better than freezing the graph.

If you want to have force and velocity displayed always, consider adding a second pair of channels with a Timing of, say 0.5 with different names and display them.  They will update continuously, but the two channels you are graphing will only update when PollSensors is running.

Link to comment
Share on other sites

Tank you for your support everything is working perfect.

I have and other question : my velocity sensor is a magnet inside a coil, so wen it is going in it generate a positive voltage and wen it is going out a negative voltage.

That is representing a graph with the 0 value in the center like the (graph-2)

i would like to graph like (graph-1).

I am not sure if it is and hardware issue.



Link to comment
Share on other sites

OK, can you provide me more detail about what is happening and what isn't working?  The most common error is to not have the path to the LabJackUD.H set correctly.  It is in line 3 of StartStream.  You will have to figure out where your LabJack drivers were installed and update that path.

Link to comment
Share on other sites

Computers require accuracy, especially in applications like DAQFactory that control real world objects.  DAQFactory, therefore, does not make assumptions, unlike, say, the auto-correct on your cell phone keyboard.  So while we read "C:\program files(x86)" and "C:\program files (x86)" and see they are the same thing except for an added space and is just a typo, the computer / DAQFactory does NOT make this assumption and add the space for you.  You have to have it perfect, and you have to correct it yourself. 

The (x86) is also important because we are talking about a path within your computer.  It is most likely that you have both a c:\program files\ as well as a c:\program files (x86)\ folder and these are two different things.

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.

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.