Jump to content
  • 0

One graph with multiple inputs


Great Lakes Cal

Question

I have a sine wave that i would like to graph. but i would also like to graph a line that is 2% above and below the nominal peak and valley. for example, if the nominal peak is 1000 and nominal valley is 100, i would like to graph a line at 1020 and 980 and then at 98 and 102. these lines would provide a visual guide to the 2% tolerance the the peak and valley of the sine wave needs to stay within. the sine wave will be coming from a load cell. the worksheet i am working with now uses a generator to simulate the load cell. i am using another genertaor and global variables to output the plus and minus 2% values. my first try was with a chart recorder but it puts each input on its own axis and not on the same axis. my next try was a yt chart but that is giving me an error. how can i graph a sine wave from one onput plus the four addisonal lines to mar the 2% tolerance of the nominal peak and valley all on one graph?

Astro DA Program.DSB

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

If you have DASYLab FULL or Pro the Action module can unlock hidden Chart Recorder features. For example, there's an action called One Windows that overlays the traces onto one graph. If the traces have different scales It will show the first channel's scale until it is disabled.  However, I didn't see anything allowing you to draw a line. Instead, use a Reference Curve to set limits. You must first create the reference curve file using the Create Reference Curve module. Review the example called example_display_refcurves

Link to comment
Share on other sites

  • 0

Thanks John. the One Windows action module took care of the graph. now i have one last issue to resolve. we are graphing a sine wave. some times the peak and valley will both be greater than zero. sometimes the peak is greater than zero bu the valley is less than zero. in my worksheet i have two graphs to show a close up view of the peaks and valleys and the 2% tolerance that they need to stay within. i am using global variables to set the Y axis scaling to values a little higher and a little lower than the 2% tolerance of the peak and valley. the math functions i am using in the global variables works just fine when the valley is greater than zer. but when the valley is less than zero, the y-axis scaling does not work out becuse the begining value ends up being greater than the end value and the graph does not scale properly. for example, if we set the amplitude to 1,000 and the set point to 0, the peak would be +1000 and the valley would be -1000. global variable 15 is used to set the begin value for the y-axis scale and global variable 14 is used to set the end value. GV 15 calculates to -979 and GV 14 calculates to -1030. so the begining value is greater than the end value and the graph sets the scale -979 for the low and high both to -979 and you see no graph. the question then becomes, how can i get global variables 14 and 15 to switch when the valley is less than zero?

Astro DA Program.DSB

Link to comment
Share on other sites

  • 0

There's something strange going on with the y-axis scaling in this situation.  If I enter the  -900 to -1000, DASYLab automatically flips the values so that Begin is -1000 and End is -900. It doesn't flip the two values when using global variables. The following calculation works when both are negative, but I'm worried it won't when one is negative, but the other is not.

VALLEY_GRPH_HI

( ( ${VALLEY_UPPER_LIM} + ( ${VALLEY_UPPER_LIM} * 0.01) ) <  0 ) * (${VALLEY_LOW_TOL} - ( ${VALLEY_LOW_TOL} * 0.001)) 

VALLEY_GRPH_LOW

(( ${VALLEY_LOW_TOL} - ( ${VALLEY_LOW_TOL} * 0.001) )  <  0 ) *  ( ${VALLEY_UPPER_LIM} + ( ${VALLEY_UPPER_LIM} * 0.01))

 

 

Link to comment
Share on other sites

  • 0

I got my USB-2416-4AO module yesterday and i connected it to my computer and changed out a generator module for the 2416. i connected a load cell to the CH0 inputs. i can measure 0 volts with no load on the load cell and 20-mv with 10,000-lb. if i go into the analog input module i can see the current channel value. sometimes its correct but most of the time its just bouncing around -0.017 volts and not showing the correct input voltage. 

i also have a digital meter connected directly to the analog input module. i have this meter set up in layout-2. i see the same thing here. sometimes it's correct but mostly shows -0.017 volts.

it also looks like this 2416 has a max sample rate of 1-khz. this is not enough i need at least 2500-hz. I'm not sure why this module was recommended based on my requirements but it think it's not going to work for me. but for now it is telling me that it can only be set as high as 57 hertz for the data rate. how do you get it to it's maximum data acquisition rate?

one other thing DL keeps telling me every time i open the worksheet. it gives me a message box that says the last time the woskheet was saved the input was set to single ended but it is now set to differential. and to run instacal to set the input to single ended. i only have one input but i would think differential would be the more appropriate selection.

Astro DA Program.DSB

Edited by Great Lakes Cal
Link to comment
Share on other sites

  • 0

Set the analog input lower limit to -0.078124 and the upper to 0.078124. It will complain about the numbers but it will select the 78.125mV range. Connect the load cell power supply negative to the GND on the USB-2416-4AO. 

The USB-2416-4AO is recommended because it has a 78mV input range and a 24-bit A/D. 

The analog input modules use InstaCal's setup. I suspect you changed the input mode after you placed the analog input on the worksheet. The solution is to replace it with a new one.

Link to comment
Share on other sites

  • 0

i have the load cell reading now and replaced the analog input module so i dont get the differential or single ended error. but now it wont let me go any higher than a 57 hertz scan rate. how do i get this to 1-khz which i think is the fastest it can go. it tells me to decrease the nukmber of channels or decrease the scan rate to 57. 1000 hertz is too slow for what i need and 57 is just not ueable at all. what's the trick to get it to 1000 hertz?

 

My next issue is a peak and valley hold display. i have digital meters set to maximum and minimum. how do i get it to display the max and min and hold those values there until i reset the meter with a reset button. it looks to be resetting on iots own every data block. how can you make hold a peak and valley and display and lower or higher numbers that may come in but keep those max and mins until manually reset with an action module and button?

Edited by Great Lakes Cal
Link to comment
Share on other sites

  • 0

Hello @Great Lakes Cal.

The analog input channels are multiplexed into one A/D converter.  How many sensors are you connecting to the USB-2416-4AO device?  A user must set the data rate in InstaCal before executing an acquistion.  Please refer to the throughput rate tables on page 35 in the user's guide.

https://files.digilent.com/manuals/USB-2416-4AO.pdf

image.png

 

image.png

If your application requires a throughput rate greater than 1 kHz/channel, then the USB-2416-4AO will not be compatible with your application.  

Please provide a specifications sheet of your load cell.  Also, how many sensors will you be using for any given acquisition?

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Thanks for the info. I am only using 1 sensor. it's not exactly a load cell. it is a trensile sample, dog bone shape, with 4 quarter bridge strain gauges bonded to it and wired in a wheatstone bridge configuration. it works just like a load cell though. the out put ia am seeing is 20-mv at full scale. that's using the 5-volt output from the 2416. i do need a much faster DA rate to capture peaks and valleys of sine waves of the load input where the load is cycling at 40 hertz. so i will need to look at exchanging this 2416 for somthing faster that has a low voltage measuring range. any thoughts?

but for now, i need to figure out how to hold a peak and valley in a digital meter and have the meters only update if the load goes higher or lower than the currently displayed max and min. the meters i have in teh worksheet now are updating on ther own and i think they update every data block. i added averging modules to slow the update rate down. but i would rather they just hold a max and min until i reset with a button and action module.

 

update...

i figured out how to get the maximum value to hold and reset. but i cant get the minimum display to show anything other than 0.

Astro DA Program.DSB

Edited by Great Lakes Cal
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...