I want the X axis to display absolute time just as the attached vi demonstrates. I just want it to display more samples at a time.
I want the X axis to display absolute time just as the attached vi demonstrates. I just want it to display more samples at a time.
What VISA name are you using? Did you try using the VISA discovery in MAX? Is the oscilloscope set up to accept commands through the Ethernet port (it sticks in my mind that you had to set this somewhere in the utility options)?
Hi everybody,
I am trying to control a Pulse Generator with LabVIEW. Sending the commands every iteration of a while loops did already worked out. However, it is unnecessary to send the commands every loop so I want to send the commands only when I change a value at the front panel. Therefore I was trying to use a event structure which worked out very well for all integer values. However, changing a boolean did not lead to the desired event. So far I found out, that I need to switch one "intermediate" toggle in order to switch the desired toggle. Switching the same toggle a few times did not lead to an event. I hope there is a simple solution for this.
I attached an excerpt of my VI.
Thanks to everybody who is trying to help!!
I understand why I should use a lossy enqueue, but I am confused on how I go from creating the queue to creating a queue based on time
I agree with the previous responders that there may be other ways to achieve what you have in mind. So please give us an idea what your end-goal is so that we can help you.
Ben
Hi!
I've tried to download "DCD-Aug16.zip" on this page : "http://www.ni.com/download/ni-device-drivers-august-2016/6262/en/", but I've got an error message: "The connection has been reset" (I'm connected to my NI account). I've tried it from Firefox browser and Chrome browser.
I've no problem for another download like LabView 2016 or NI DAQMx ...
I absolutely need these drivers.
What should I do?
Thanks
The only change you need to make is to put the Trigger control (on the Block Diagram) inside the "Trigger": Value Change Event. Did you notice that all of the Square Booleans have mechanical action "Latch when Released"? This means that their value ("On" or "Off") "sticks" until the control is read. This is ideal for an Event Loop if the control is inside that Event -- when the Event "fires", the Control is "returned to default state" (i.e. turned Off), ready for the next Push.
In your case, you read the Trigger at unspecified, unknown times that have no relationship to the Event Loop. Who knows what value will be seen?
Bob Schor
I am having trouble with displaying data from my consumer loop. I am using a producer loop to acquire and save data. The consumer loop is only to display data for the user with indicators and graphs. The indicators appear to flash as the data is displayed too quickly. I have tried slowing the loop, switching to notifications instead of queues and other tips from the forums and examples but nothing seems to work. Does anyone have a suggestion?
My vi is attached. I am using labview 2015 sp1.
Thank you,
Chris
I am attaching a Zip file which is a sample call of a Sub VI from Main VI. This uses relative paths and VI Server to load the Sub VI.
Just want to know how to do the same thing using Static VI reference. Some of the settings in that process are not clear and hence the query. I guess its far more efficient way to do this instead of with relative paths ?
TIA.
Hello!
Since I have some time, I decided to clean up/revise some of my VIs in some of my projects. I use an action engine to store sensor data (columnwise) along with absolute time stamps. The data is generated with 1Hz, and I only need to store 2 days of data (172 800 values per channel). My code works as intended, and using a simple banchmarking, a data insertion + Graph curve read out operation together takes roughly 60 msec. This is just fine for me, because I only call this AE at two parallel loops: at one place I insert the new sensor values, and at the other I read out selected curves (max 12) between the user specified time stamps. Both loops iterate with 1 Hz.
The AE is called: "Data_storage_AE.vi". The VI where I decimate (average) the data curves to be less than the max horizontal pixel size of my Graph (I do not want to plot more points than the number of pixels): "decimate _for_curves.vi".
The code works well, but I would like to fix the Rube-Goldberg parts, and also to gain some speed if possible. I have some changes in my mind, and I searched such topics in the forum, but I thought the best is to show you people the VIs (I zipped up the relevant VIs/Ctrls from my project, version LabVIEW 2017)
I am looking for optimization mainly at these locations:
Thanks for any advise, I am willing to learn!
Remove all timers (including, and especially, the Elapsed Time Express VI) from the Consumer Loop. The "clock" for the Consumer Loop is the Queue -- the Consumer Loop will run at the same speed (or slower) than the speed at which the Producer puts elements on the Queue. Suppose an element goes on once a second -- the Consumer will take off an Element, "do its thing" with the data (for LabVIEW's sake, get rid of that Sequence Frame -- Data Flow handles all the sequencing you need), and will loop, "stalling" (and thus not updating any of the displays) until the next data point comes in a second later. If the Producer is faster, the Consumer will "try to keep up" and become faster.
Bob Schor
First Go HERE and download the instrument driver for that device.
Then go here and RTM. You are not doing what you think you are doing.
Several problems exist.
Then we can talk about actually using the instrument driver correctly.
open session once
Configure
Trigger
Configure
Trigger.....
Close session once.
That is why you need to edit the X values at the minimum and maximum ends of the scale to be farther apart in time. It will probably help if you edit the display format to show the date as well since the beginning and ending times will be on different days.
Hello Everyone,
I am using speed sensor MX5015 through sbRio-9636 board.My target is to measure the time when the sensor gives 40 rising edge and repeat it. To get this, I put a counter. If the counter is equal to 40, then I am trying to get the timing through Tick count expresss VI (screenshot). But it is not giving me the time till the sensor get 40 rising edge.
Can you please tell me what is the problem with this method? or is there any other method by which I can measure the time?
I am new in LabVIEW. so if I did someting really stupid, please forgive me.
Best Regards
Sazzad
Hi Bob_Schor,
first of all thank you very much for your help!
I`m sorry but I did not understood where the mistake is. Now I moved all boolean controls on the block diagram inside the respective event but nothing changed. I have still the same problems. As an expample:
When I start the VI and switch the output on, the command is executed. But than, I can switch the output toggle as often as I want, nothing will change, so I will not be able to turn the output off again unless I switch the polarity toggle and than the output toggle again. Now, because I switched the polarity toggle (the command was not exectued) the output at the Pulse Generator is switched off, so the command was executed.
I`m sorry, this is probably a stupid question, but I wasn`t able to figure out how to solve it yet.
Could you please modify the VI or give me a detailed explanation what I have to change?
Marv_92
1. Your DAQmx tasks should be combined into 1 task. This will make things a lot simpler for you.
EDIT: I just noticed I missed the task wire from the second Create Virtual Channel and the DAQmx Timing. Too lazy to fix it right now.
2. Tell the DAQmx Read how many samples to read. Since your sample rate is 100Hz I would just use 10, giving your producer a loop rate of 100ms.
3. You really should move your logging to the consumer loop. Alternatively, just use the DAQmx Configure Logging and then DAQmx will handle all of the logging for you. This would be a lot more efficient than even a Producer/Consumer for logging.
4. You do not want a wait in your consumer loop. If we slow down the producer loop like I told you in 2, then your consumer loop will not be able to go faster (unless it get really slow for a few seconds, but that would be a different issue).
5. You can expand the Index Array to get all of your elements without even using an index constant (first defaults to index 0 and increments from there).
Bob_Schor wrote:Remove all timers (including, and especially, the Elapsed Time Express VI) from the Consumer Loop. The "clock" for the Consumer Loop is the Queue -- the Consumer Loop will run at the same speed (or slower) than the speed at which the Producer puts elements on the Queue. Suppose an element goes on once a second -- the Consumer will take off an Element, "do its thing" with the data (for LabVIEW's sake, get rid of that Sequence Frame -- Data Flow handles all the sequencing you need), and will loop, "stalling" (and thus not updating any of the displays) until the next data point comes in a second later. If the Producer is faster, the Consumer will "try to keep up" and become faster.
Bob Schor
I read the requirement a bit differently. I read it as "take a snapshot every x seconds and display it to the user". In this case, I feel an Elapsed Time Express VI is still appropriate, but used in a different way. Let the consumer do its thing the way you described above, but only display what's in the queue if the elapsed time has expired. So if the Elapsed Time Express VI is set to 5 seconds, the consumer keeps dequeueing as fast as the data is coming in, but only when the elapsed time has expired do you actually display it.
I'm new here so Hi to everyone !
I'm new with LabVIew also, so sorry for probably "stupid question".
Could you help me recognite this function with "house" ? From what I found out this function is letting us to choose from every "icon" which was used in blockdigram and then i can use it string representation. I found this blockdigram in old computer and i want to use this "function" in my raport.
Thank you !
Have you tried the Start Asynchronous Call function? I stopped using VI Server shortly after Start Asynchronous Call was added to LabVIEW (around 2010, perhaps?). I urge you to try this:
One tremendous advantage of this scheme is that it works exactly the same whether in Development Mode or built into an executable. Here's a Snippet to admire (in LabVIEW 2016):
Bob Schor
This usually is a problem with your ISP or Internet connection. There may be a restriction on large downloads or other issues. [It could be at NI's end of things, but I'm betting my usual extravagant one dime that the problem is "closer to home" ...].
Bob Schor