LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble displaying the x-axis on a waveform graph properly with my Block Diagram

Hi all,

 

I am trying to create a made up EMG signal with various signals entering it. I think I am OK as far as there but when I am displaying it on the waveform graph the X-axis or Time keeps moving and I don't know what it means? I am trying to get it to stay at 10 second intervals. Please find attached my front panel and block diagram. If anyone needs more information, just ask, I'll be more than happy to answer. 

 

If someone could take a little time to help me out I would sincerely appreciate it.

 

Kind Regards,

Mark.

0 Kudos
Message 1 of 12
(3,244 Views)

Hi,

 

I'm not quite sure what you mean. Do you mean you want the scale of the graph on the right to be fixed to start at 0 and add the data on the end? or do you mean you just want to see the first 10 seconds or whatever of data?

 

A quick tips for you as well.

If you right click the Frequency and Amplitude dial controls you have on the Front Panel, then select "Visible Items", then "Digital Display". This will replicate what you are doing with adding an extra indicator there (this method just helps keep your block diagram cleaner). You can also disable the Increment/Decrement of the new display if you right click on the new box, "Visible Items", "Increment/Decrement".

 

Olly

**********************************************************************************************
The day is quickly coming when every knee will bow down to a silicon fist, and you will all beg your binary gods for mercy.
0 Kudos
Message 2 of 12
(3,223 Views)

Hi Olly,

 

My plan is to create an EMG signal using multiple Sine waves, put them through a Band Pass Filter then through a Low Pass Filter then, finally, a Threshold (I'll be using a comparision here) and it will set off an alarm (LED) if a certain value is hit. So far the trouble I'm having was with the graph but your previous comment helped me there, however, for some reason I can't seem to get the LED to light up, I'm struggling to see why. I will attach an updated version of my VI. Please forgive if it seems crude.

 

Thanks for your time Olly.

 

Kind Regards,

Mark.

0 Kudos
Message 3 of 12
(3,216 Views)

No worries. We all start some where. I've not been doing it for that long either.

 

To be honest, I hate using express VIs and shy away from them. However, it would appear the greater or equal one you are using requires you to wire a constant value to one of the input terminals so that it has something to compare against. Running your VI, you will find that if you set the constant value to be lower than 0 then the boolean light will turn on.

 

Out of interest, what version of LabVIEW are you running? 2012?

 

Olly

**********************************************************************************************
The day is quickly coming when every knee will bow down to a silicon fist, and you will all beg your binary gods for mercy.
0 Kudos
Message 4 of 12
(3,210 Views)

[Disclaimer: The beginning of this post is primarily a rant, but please read on]

 

This situation illustrates what I don't like about LabVIEW's included Express VIs, and why I never use them. They hide too much of the inner workings to get you "up and running faster." Because of that, they are not nearly as easily personalized to get exactly what you want for your project. But IMHO, the biggest problem with them is that they often (always?) use "dynamic data" inputs and/or outputs, a black box of data which may or may not help you at all.

 

The "dynamic data" in your case hides just what is sent to your graphs (BTW, don't erase the labels for your graphs, just make them invisible, because what you have could be a waveform graph or chart according to the icon, which have very different attributes, I had to go to their Properties to distinguish them.), and this is ultimately why you can't easily fix your problem.

 

I would suggest that you build your waveforms from the straightforward VIs in the palette in which you found the Express VI, then connect them to your graphs. You'll have a lot more parameters to set, but you will understand a lot more about what's going into your graphs and can fix them to your liking.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 5 of 12
(3,207 Views)

I think the real danger of express VIs is worse than the fact they hide what they do.

 

They are the first things shown to new customers (including management). They show LabVIEW as a simple environment requiring nothing more than dropping 3 or 4 icons and filling in a few text fields that then pop up. Which works well for selling the product, but then when management expect you to be able to knock up any program in an unreasonably short amount of time... well...

 

Anyway, back to the subject. I agree that the dynamic data type is horrible to work with. If you'd like to try to rewrite your program without the use of express VIs so you have more control then I'm sure you'll find all the help you need in the forum here 🙂

**********************************************************************************************
The day is quickly coming when every knee will bow down to a silicon fist, and you will all beg your binary gods for mercy.
0 Kudos
Message 6 of 12
(3,200 Views)

Olly and Cameron,

 

Thank you both for your patience, as you can both probably tell I am quite new to LabVIEW and yes it is the 2012 version. Regarding the comment about making the constant value a negative number, it does light the LED when it is negative but when I change the values with the knobs the doesn't change at all. 

 

I thought by assigning a value and if my wave exceeds the value the LED should light up? Any idea why this isn't happening?. 

 

Cameron, I have taken your advice on board and work that way in the future but I want to try get it something presentable by next week.

 

Kind Regards,

 

Mark.

 

0 Kudos
Message 7 of 12
(3,199 Views)

@mbrolly2 wrote:

Olly and Cameron,

 

Thank you both for your patience, as you can both probably tell I am quite new to LabVIEW and yes it is the 2012 version. Regarding the comment about making the constant value a negative number, it does light the LED when it is negative but when I change the values with the knobs the doesn't change at all. 

 

I thought by assigning a value and if my wave exceeds the value the LED should light up? Any idea why this isn't happening?. 

 

Cameron, I have taken your advice on board and work that way in the future but I want to try get it something presentable by next week.

 

Kind Regards,

 

Mark.

 


Then, for a quick Band-Aid, (I hate to say it), I'd go to the Express->Signal Manipulation->"Convert from dynamic data" function to pull out your data to work with until you can rewrite your program.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 8 of 12
(3,190 Views)

@OllyT wrote:

I think the real danger of express VIs is worse than the fact they hide what they do.

 

They are the first things shown to new customers (including management). They show LabVIEW as a simple environment requiring nothing more than dropping 3 or 4 icons and filling in a few text fields that then pop up. Which works well for selling the product, but then when management expect you to be able to knock up any program in an unreasonably short amount of time... well...

 

Anyway, back to the subject. I agree that the dynamic data type is horrible to work with. If you'd like to try to rewrite your program without the use of express VIs so you have more control then I'm sure you'll find all the help you need in the forum here 🙂


Olly, I agree with you completely. My post above was just getting too long.

 

IMHO, if a company is going to buy LabVIEW and expect a rookie to program in it, the company needs to get that person to a training facility to at least learn Core 1 and 2 ASAP after purchase. It only costs a week of time and about 1/3 of the LV license (plus travel, if necessary) and will get him going many times faster than learning it on his own (even with the self-paced courses). That's what my company did with me, and I know it was worth much more than their investment in time saved and frustration (and calls to NI for help on every little thing) prevented.

 

Disclaimer: I do not work for, nor have any financial interest in any LV training operation, whether owned by NI or anyone else. I just shudder to think of where I'd be without having taken the classroom instruction.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 9 of 12
(3,184 Views)

...Something like this maybe?

 

Remember the values you are comparing the constant against are very small values.

 

Hope that helps a bit. I also took the liberty of tidying things up, swapping the express VI wait function for a normal one etc.

 

Oh, I meant to wire up the errors but forgot. Nevermind.

 

Olly

**********************************************************************************************
The day is quickly coming when every knee will bow down to a silicon fist, and you will all beg your binary gods for mercy.
Message 10 of 12
(3,180 Views)