Waveform WebGraph Interaction

My goal is to create a graph of waveform with the following criteria.

  1. Click/double click on the chart to draw the cursor at the nearest location.
  2. Draw a rectangle to zoom.
  3. Indicate a way to zoom out.

With the code below, I can double click to draw the cursor to the closest place and draw a rectangle to zoom.  However, I can't figure out how to zoom out.

What I am doing wrong?

(Measurement Studio 8.5 & Visual Studio 2008)

Imports NationalInstruments
Imports NationalInstruments.UI
Imports System.Drawing

Partial Public Class PlotData
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If not IsPostBack then ' generate initial random signals
myGraph.PlotY (GenerateData (1000))
End If
End Sub

Protected Sub myGraph_PlotAreaClick (ByVal sender As Object, ByVal e As NationalInstruments.UI.ClickEventArgs) Handles myGraph.PlotAreaClick
Dim plotX As Double, foot As Double

InverseMap (myGraph, provable, e.Y, plotX, foot)
myGraph.Cursors (0). MoveCursor (plotX, foot)

"To display the click coordinates and plot
cursor_lbl. Text = "X:" & "Y:" & provable, e.Y & "pX:" & plotX & "pY:" & foot
End Sub

Private Shared Function GenerateData(ByVal dataLength As Integer) As Double()

Sun data (dataLength) As Double
Dim rnd As New Random()

For i As Integer = 0 To dataLength - 1
Data = Tower. NextDouble() * Math.Sin ((i / 3.15))
Next

Return data
End Function

Private static void InverseMap(ByVal graph As NationalInstruments.UI.WebForms.WaveformGraph, ByVal xClick As Integer, ByVal yClick As Integer, ByRef xPlot As Double, ByRef yPlot As Double)
Dim ACE Double, Double xMin xMax
Dim yMin As Double, yMax As Double
Dim plotLeft As Double, plotRight As Double
Dim plotTop As Double, plotBottom As Double

xMin = graphics. XAxes (0). Range.Minimum
xMax = graphics. XAxes (0). Range.Maximum
yMin = graphics. YAxes (0). Range.Minimum
yMax = graphics. YAxes (0). Range.Maximum

With the chart. PlotAreaBounds
plotLeft =. Left
plotRight =. Right
plotTop =. Back to top
plotBottom =. Bottom
Ends with

xPlot = ((xMax-xMin) * ((xClick-plotLeft) / (plotRight - plotLeft))) + xMin
yPlot = ((yMax-yMin) * ((plotBottom-yClick) / (plotBottom - plotTop))) + yMin

End Sub
End Class


InteractionMode = "ZoomX, ZoomY, PlotAreaClick" >

Hi Steven,

The solution that I can think of is to use a special key (i.e. Control) as well as with a mouse click to zoom out. It will take some work on your part.

The plot are click event does not provide any information on if there is a press of a key. To do this, you manually from the client-side information on the side go server you had pressed the button control key while you click. This can be done using a HTML hidden field.

How to pass the CTRL button information from the client to the server?

(1) adds a hidden field (say with the attributes id and name the value "ControlKeyPressed") inside the form that is rendered by default in the .aspx file.

(2) at the end of the form, write the key down and key events on the document.

(3) in the javascript event handlers, when you press the control key, the value of the hidden field as 'Y', in all other cases, the hidden field value is set to 'n'.

The .aspx code would look like,




onplotareaclick = "WaveformGraph1_PlotAreaClick" >













Now, when there is a PlotAreaClick event triggered on the server (here meaning the c# /VB code), the server manages the parameters that the client had sent. You can access the parameters as follows,

Dim str As String = Context.Request.Params ["ControlKeyPressed"] as string

Now, your PlotAreaClick handler would look like,

protected void WaveformGraph1_PlotAreaClick (object sender, e ClickEventArgs)
{
If (IsPlotAreaClick())
{
//--------------------------------------------------------------------------------------
Important note:
You will need to keep a stack to remember the beaches of x / axes there before setting the new ranges.
Keep the battery in a session variable or a variable application or make the battery a static variable.
First, push the current x / go to the battery.
//--------------------------------------------------------------------------------------

Then, complete the tasks that you intend to do.
The new range computed value x / there axes.

WaveformGraph1.XAxes [0]. Range = new range (0, 1); It's your new calculated range.
WaveformGraph1.YAxes [0]. Range = new range (0, 1); It's your new calculated range.
}
on the other
{
Pop the stack item and assign the range x / there axes.

WaveformGraph1.XAxes [0]. Range = new range (0, 10); Here, you use the skip value of battery.
WaveformGraph1.YAxes [0]. Range = new range (0, 10); Here, you use the skip value of battery.
}
}

Private Boolean IsPlotAreaClick()
{
Dim str As String = Context.Request.Params ["ControlKeyPressed"] as string

If the value of the parameter is 'Y', then it means that the action was a zoom out, not a ground area click.

If (str == 'Y')
Returns false;
otherwise returns true;
}

I hope this helps.

Tags: NI Software

Similar Questions

  • Jumps in with NI5922 waveform

    Hello

    I'm using NI5922 digitizer with NIScope 3.8.1 and software LabVIEW 10.0.1 (64-bit).

    If I have other things on Windows (like changing other windows, open another program) I get jumps (steps) in my chart of waveform (see cover photo).

    (A) what is the reason for this (my material is really very fast)

    (B) is there a solution?

    Seal of front panel and block diagram

    Welcome them

    Tobias Broger

    IMM

    Could you post your real code?  On the screenshots, there are several questions, you may want to address.

    1. Is your view of data, a chart, or table?  If it's a graphic, the behavior is expected (you will get several signals on a single screen, and you acquire no continuous data).  If a graph, we need to look at your block diagram.

    2. Your code to check the stop condition is continually poll.  This will miss a thread of your enforcement system.  I recommend that you use a structure of event for the interaction of I/O.  At the very least put a delay of 100 ms in this loop.  This could be the cause of your problem.

    3. You use a loop timed for your screen.  The queue will ensure that the loop runs at exactly the same speed as the loop of data acquisition.  At worst, the display will not be able to deal with the acquisition.  Use loops to specify a processor will not work in this case, because all your call loops have UI components, forcing all use the UI thread or by generating a lot of fly wire, which could also be the cause.

    I recommend that separate you your features a little differently to make it work well.

    1. Put all your code in a single loop data entry running of the event structure.  When something changes (ex: vertical extended the scope), the structure of the event sends a command (through the queue) to one of the other loops.

    2. Equip your acquisitions of material separate loops (your already have this) managed by processors in order with the State queue.  For example, in the case of scope, a change of vertical range would value in a local shift register.  If the acquisition was running (status = running), the value is also sent to the scope.

    3. Equip your displays separate loops, powered by queues (you did for the field of application data).  I am familiar with how IMAQ updated images of the front face, so a queue may be inappropriate here.

    If you want an example of this type of architecture, check out this post and those leading to it.  Good luck.  Let us know if you need more information.

  • Interactive components ASPX

    How can I make components (for example, a waveform graph) Measurement Studio interactive (rather than be saved as an image) so the user can interact with them?

    Edit: I am trying to emulate the functionality of cursor/Zoom/etc of the LabView graphical control on my Web page.

    Have Steven you tried the sample forms for Measurement Studio Web? In windows 7, they are found in C:\Users\Public\Documents\National Instruments\MStudioVS2008\DotNET\Examples\UI\WebForms. Also check out this knowledge base: http://digital.ni.com/public.nsf/allkb/9598EC0D793DAD96862573E7006581DE and some more information about the examples and their location in windows xp is here: http://forums.ni.com/ni/board/message?board.id=232&message.id=6986&requireLogin=False .

  • Waveforms vs DDT?

    I'm not sure that you understand the difference between the waveforms dark red and dark blue dynamic data. Are below the equivalent operations? What sense is "better"? (Assuming my signals interact with a PXI and USB Renault)

    I think they produce the same net result. We're never quite sure of the DDT.

    I don't know of any experienced LabVIEW user who likes the DDT.  Champion Dennis Knutson refers to it as "evil".

    The waveform is well defined: it is a specific type of cluster that contains a time stamp for t0, a double for dt, a table of Double of Y and optional attributes. DDT is more like a Variant almost anything can be converted to DDT, but the conversion process is hidden behind a wizard and there is no way of knowing what is there by looking at the wire.  LV will make a suggestion on how to convert the data, but you have no way of knowing if it's a good suggestion or if you got all the information whiich has been hidden in there.

    If you avoid screws Express (again, like many programmers of LV), you don't need to worry about the DDT.

    If DDT went away, I wouldn't miss it.

    Lynn

  • How to display the signal on a waveform graph in Labview Signal Express?

    Hello

    I want to display a signal in Signal Express 3.0 in a "waveform table", but don't know how to do it and I think that it may be impossible?

    In Labview, there are two ways to view data, a 'waveform table' or a 'waveform graph. The great thing with 'picture of waveform' is that it allows you to set a length of history and you can see the data move to the left (option graphic strip) that samples are recovered. It works perfectly.

    In Signal Express I can only select "Graph XY" or "Waveform curve" by doing a right-click of the mouse, but I can't select "table of waveform. Is it really true that it is not possible to view data in a graph of waveform "with Labview? (1 analog signal during streaming, 100 samples to read at the rate of 1 K)

    Thank you in advance,

    Enrique

    Hi Enrique.

    You are right that there is currently no graphic waveform in SignalExpress. The thing nearest you can join, is saved data under a log and then he looks one when recording (which I know this isn't quite the same interactive behavior).

    For your last comment, you wrote 'waveform curve', but I guess you meant 'picture' here as well.

    Sorry about that. We recently received this request, then perhaps in a future version.

    Phil

  • LabView Signal Interaction through DAQmx

    I try to use simple mathematical functions (addition, subtraction, division) to manipulate four signals at the same time. I've been able to show the signals on a single graph, but I need the signals to interact. I use an oscilloscope DAQmx base. I use several manipulations different signals ([A + B]-[C + D], [A plus D]-[B + C]...) and I'd like to ride within a business structure as well, even if this is not the part I'm strugging with.

    Any help or the preview available would be just ducky

    Adding and subtracting work digital palette on waveforms.  Is that what you wanted to know how?

    Lynn

  • iPhone 7: interactive Notifications

    Hello!

    I backed up my iPhone 6 and restored then the backup of my new iPhone 7. The only feature that seems to be 'missing' are the news interactive Notifications in iOS10.

    When I swipe to the left of any notice of my lock screen (whether they are always locked or unlocked by TouchID), the only option to appear is clear. It is reportable in the absence of notice. So, I have to enter the application to meet an iMessage or similar to other applications.

    I checked the following parameters:

    • Press ID and password > access when they are blocked > all permits
    • Notifications > Messages > all permits with banners

    I am not sure if I missed something or if it is a bug.

    As I said, it worked properly on my iPhone 6, and I can always contact notifications in this way by the banners, but not from the Notification Center or the lock screen.

    I also tried to compare my settings from my iPhone 6 to my iPhone 7 and everything seems to fit. I also tried to toggle the settings that I listed above.

    This was one of my favorite features of iOS 10, so you can imagine that I can't wait to make it work properly.

    If anyone has any other ideas, please let me know.

    Thank you!

    -Eric

    After talking with @AppleSupport on Twitter, I discovered that it is because the 7A 3D so that iPhone Touch iPhone 6 does not. Left of the slide and view option is now the same as the use of 3D touch on the notification.

    Tricky, but logic.

  • Firefox does not accept my mouse interaction

    Firefox is not allowing me to interact with elements on Web pages. Here is a list of some of the websites that I have trouble with:

    - http://railsapis.codeschool.com/levels/1/challenges/1 and http://railscasts.com/episodes/417-foundation?autoplay=true

     I can't use the video controls
    

    - https://soundcloud.com/jo-o-anderson-1/loreen-euphoria

     I can't use the seekbar.
    

    - http://yashry.com/search?q=iPhone

     The arrows of the price range slider don't drag. Instead, the underlying text is selected.
    

    I tried to use Firefox on Mac from a friend and it works properly. I guess it's a problem with an entry in my topic: config, but I don't even know what to look for to describe this problem.

    I use Firefox on Mac OS X 10.10.1 33.1.1 (B 14, 25).

    Set to dom.w3c_touch_events.enabled to 0 to Subject: config solved.

  • How 1Password interacts with Filevault

    CCan I save my FileVault paso rd in 1Password' and if so, how they would interact?

    NM

    Yes, you can store your FileVault password in 1Password.

    They do not interact in some way.  1Password is just an encrypted file stored on the file system, that if FileVault is turned on, is then encrypted again once.

    But 1Password does not enter your FileVault password when you boot.  You must manually type in your FileVault password.

    And if you do not distribute your 1Password file to other devices via iCloud or DropBox, then you will not be able to use 1Password to search for your FileVault password.  That is to say that if you have NOT another copy of information of 1Password containing your FileVault password, you will not be able to launch 1Password to search for your FileVault password should you forget it.

    I keep my FileVault password in 1Password, but I also synchronize my 1Password with another Mac and my iPhone details, so I always have access to my FileVault password, should I forget it.

  • Loaded with FF on laptop (Win 8), why is there no way to interact with it?

    FF loaded on my new laptop using Windows doesn't have a toolbar to allow me to interact with him. What can I do about this problem?

    East - the normal Windows 8, no RT?

    If you don't see any of the regular bars (e.g., tab, toolbar, toolbar bookmarks bar), your Firefox can be full-screen mode. The F11 function key toggles between the normal modes and full screen.

    If you have a tab bar, you can right click on an empty area of it or click New tab (+) and select missing toolbars from the menu that appears.

    A little luck?

  • How can I get the interactive weather maps at work since the last FireFox update?

    Interactive maps from Weather.com and Intellicast.com stop working for me with the latest updates (June 2012) to v13. Guess that do not know if it's the right "place" for this question, but need help I'm exasperated with Firefox (after years and years of being a happy user). It is not that difficult with an update!
    I have searched for a solution on Mozilla and other places and have so far led to nothing useful. Suggestions that I found so far are useless and its pretty crazy that an update for this browser would cause such a headache! Change local block has no effect. Checked on my firewall/security. Is it not. Reinstalled Java. Not it (I got the latest version installed). It is not just this much trouble to access my usual sites after an update of the browser! Note that the interactive maps on both sites work fine on Chrome and IE.

    Problem with the video play in Firefox 13, do not play the map interactive from weather.comand mlb.com/gameday Solution below worked for me.

    Jeromie Clark 2012-06-14 13:55:05 PDT          Comment 24
    

    Disable the plug-in RealPlayer browser recorder is not sufficient to solve this problem.

    You must fill out * all * the following steps:

       Launch RealPlayer
       Click the RealPlayer icon in the upper left corner of the window and choose Preferences.
       Choose Download & Recording from the left hand panel
       Uncheck "Enable Web Download & Recording for these installed browsers"
       Click OK and close RealPlayer
       Restart Firefox
    

    Re: https://bugzilla.mozilla.org/show_bug.cgi?id=764210

  • I missed the prompt to update my notes. My software is up to date, but there is no option to update notes. How can I get this opportunity again? I want to sketch options and make interactive lists.

    I missed the prompt to update my notes. My software is up to date, but there is no option to update notes. How can I get this opportunity again? I want to sketch options and make interactive lists.

    Open the Notes app and look near the upper left corner to see if the upgrade option is there.

  • How it forms an insert and interactive pdf in ibooks?

    How can I insert a PDF form that requires the player select or type in a response and submit the option in an ibook?

    In PDF format, when inserted in an IBA 'book', loses their interactivity.

    You will need to drop the PDF and use a q / a widget, on the contrary.

  • Viewfinder LUT vs exposure tools (Zebra / waveform)

    Hi guys,.

    Discussions on our new found access to MLUTs and the AE CINE was great, thanks for all the info fascinating so far. So forgive me if this has already been covered, but I have two questions:

    (A).. .for MLUTs in the viewfinder to be of any practical, why use the waveform monitor and the Zebra reacts to the MLUT when applied, as opposed to the same as if the MLUT has not been applied to all? IE - as an image in the viewfinder as slog2 sgamut my Zebra / wave give me information of the exhibition which is very useful (next to my light meter) but when I apply, say, the REC709 MLUT of the VF, news of Zebra and waveform to adapt to the new image - so REC 709 points out, blow and my zebras tell me now that the parts of the image is blown... But I'm still recording to SxS cards like sLog2 sLog2 - so, in reality, this info is not get blown at all.

    So what I mean: the REC709 MLUT is ideal to boost the brightness etc. in the viewfinder and makes the image easier on the eye than the image dark sLog2, but I always feel like my tools of exposure to expose properly for the image being recorded to the card (in this case sLog2). I hope that all makes sense... Accept others, or am I missing something here?

    and the second point is:

    (B).. .throughout all the upgrades for the camera by setting the number 2 zebras at 109% don't turn on for me in the VF, despite an image being obviously blown. No more than 108%, or 107%. However the zebras behave corectly to 106% and will show the 'Zebra lines' when the image is burned.

    Is there a reason why 109% zebras does not illuminate, or am I missing something here too?

    Thanks for all your comments guys - happy shooting.

    Tom

    www.tomdavid.com.au


  • In preview, can I listen to audio files in an interactive pdf?

    We did a huge interactive pdf file in InDesign, with text and sound and video files. They read well both in Acrobat Reader on imac and a PC with Acrobat Pro. The file opens in the application overview on imac, but then the audio files and video files are not possible to open. Anyone know if there is a feature to listen to sound files in the application preview or Acrobat Reader is that so?

    If your A / V files are not also playable in the preview, then there is no configuration preview that will change this fact, and the interactive visualization is Adobe Acrobat Reader on the Mac.

Maybe you are looking for