From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LJStream accomodate triggering??

Hi,
I have gotton the LabJack to work with LabView. What i need is multiple channels, real time and continous display, and triggering capabilities. The labjack will be used for sensor capability as well as to control the pressure entering the valving system. I have looked at LJStream and it enables up to 4 channels which is all i need really.My questions are:
1/Can it(LJSteam) accomodate triggering to enable my valves to work and how do i do this in LabView??
2/Are the voltage equations important?(y=v1)
3/I tried including LJSteam in labView but i am not getting a voltage output. It is reading 0 on the graph but the test voltage values in the box are reading the real voltage. How do i get the graphical output to work??
4/Is there a better VI to use to meet my requirements?

Your help will be appreciated
Thank you in advance



0 Kudos
Message 1 of 17
(3,450 Views)
1.  You can process the data as it comes in, and make decisions, but the bigger problem is that you cannot do anything else with the U12 while it is streaming.  See the following:
 
 
You will either have to stop the stream to set your outputs, or you need to not use stream at all and collect your data in command/response mode.
 
For more flexibility you need to move to the U3 or UE9, which can do other things while streaming.  See Section 3.2 of either User's Guide for stream info.
 
 
2.  If you want to scale your data, the scaling equations are quite useful.
 
 
3.  I am not sure what you mean by "include LJstream in LabVIEW".
 
 
4.  If you are not a very experienced LabVIEW programmer, you might want to start with "simple ai stream example.vi" rather than "LJstream.vi".  LJstream is a pretty complex VI, whereas the simple example just has the basics and lets you add the LabVIEW code that you require.
0 Kudos
Message 2 of 17
(3,440 Views)
Thank you for the info you last sent about not being able to trigger when using stream.So my next question is this-Can i simply use LJLogger since it operates in command response mode to log my data which will be Voltages against time and then will i be able to use the loggers trigger capabilities to control my valves??? If so will it be simple to modify the logger to include a graphical output??
0 Kudos
Message 3 of 17
(3,423 Views)
If LJLogger is able to achieve the sample rate you desire your idea will work fine. Adding a graphical output to labview is quite easy. There are a large number of chart and graph examples included with LabView.
0 Kudos
Message 4 of 17
(3,404 Views)
How can i add a delay in labview using the Labjack U-12. The wait VI slow downs my enitr program. Is there another way to add a delay other than using WAIT??? I am trying to turn off and on my valves using the LabJack in Labview. I can control the valves but i need the valve to turn on and off after a particular amount of time. Will you be able to help me. Thank you in advance
0 Kudos
Message 5 of 17
(3,367 Views)
Sounds like the wait is in the same thread as other stuff that you want to keep processing.  Maybe instead of wait you should just poll an LV functino that returns time so that you can occasionally check to see if your desired amount of time has elapsed.
0 Kudos
Message 6 of 17
(3,363 Views)
How exactly will i pool the LB function. I have tried all ways. It is possible to have a delay using simulink(which is similar to labview but when i try it in LV it doesnt work. I have attached my LV program that is connected to the LabJack U12 and that controls a valve controller. Will you be able to direct me as to how to go about adding a delay??? Just to remind you: I want to turn off my valve when a particular threshold is met, but i want this done a few ms after the threshold is obtained. I then want the valve to stay off for a particular time, then turn on again. This will enable me to monitor my system. When using the wait VI in LV i can control the valves but my data aquisition is no longer real time(My data is being recorded at a rate that is influenced by the wait function.) can you take a look at my program?? Its for one channel and it turns one valve on and off. Will you be able to make any suggestions on my layout etc?? Any help is appreciated. Thank you
Download All
0 Kudos
Message 7 of 17
(3,334 Views)
I looked at your VI, and you did not include some sub-VIs, but from I can tell it is not doing what you are describing.  The only thing I do see is that there is no dataflow between the EAnalogIn and EAnalogOut calls, and thus the timing relationship between these is unknown.
 
What you are describing is just an LV programming problem.  There are lots of ways to do it, but my first approach would be a state machine.  That means you put an enumerated case structure inside a while loop.  You can put a "Wait Until Next ms Multiple" VI in the while loop such that the state machine executes at some set rate, then you have different states to handle different conditions.
0 Kudos
Message 8 of 17
(3,331 Views)
Sorry for not sending the sub VI's .I have them attached now. Thanks for your suggestion as well, I will try it out. One more thing...I know it may be asking too much but can you provide me with a sketch if possible. I am fairly new at programming so i don't have a strong hold on the jargon, but a diagram of what excatly a state machine is and looks like will help. Thanks so much
Download All
0 Kudos
Message 9 of 17
(3,325 Views)
I did a Google and found the following:
 
 
0 Kudos
Message 10 of 17
(3,323 Views)