LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni-Scope Single Sweep

I have an application that uses Ni-Scope drivers and a NI USB-5132 oscilloscope. I am currently adding a single sweep feature to the scope to we can capture inrush currents.

 

Now obviously I am wrong because it does not work this way but my thinking here is this:

  1. Setup scope Horizontal, Vertical, Triggering, etc...
  2. Start an acquisition and wait for a trigger
  3. When triggered perform one sweep and stop

No matter what I try I always get TWO SWEEPS!

I lose the inrush capture because when the scope stops it is displaying the second sweep.

 

I have attached a stripped down version of my program with all the non-scope related stuff taken out.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 16
(2,438 Views)

Sigh.  Ever since oscilloscopes went digital, I've been lost (and I'm talking about a Tektronix 3034, a fairly old scope).  When everything was analog (including the "moving beam"), I could believe what I was seeing and, even better, understand what I was doing ...

 

Is there a possibility that there's a "pre-trigger" sitting in there?  What if you start an acquisition and give it no trigger?  Do you see nothing, or do you get a sweep ("I know he wants to see something ...")?

 

Bob Schor

0 Kudos
Message 2 of 16
(2,421 Views)

@Bob_Schor wrote:

 

Is there a possibility that there's a "pre-trigger" sitting in there?  What if you start an acquisition and give it no trigger?  Do you see nothing, or do you get a sweep ("I know he wants to see something ...")?

 

Bob Schor


I see nothing, it just sits there waiting for a trigger like I would expect.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 16
(2,417 Views)

So thinking about the pre-trigger...

 

I kind of use 50% pre trigger by default here as I do in an actual DSO so the trigger point is centered on the screen.

 

I and beginning to wonder if it's not so much that I am getting two sweeps, but that one sweep after %50 pre trigger and not fit on the screen and I am just not seeing it all, just the end?

 

But then again that does not make sense, because why even have a pre-trigger if you can't display it? 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 16
(2,414 Views)

I have further removed extra parts so now anyone with NI-Scope and the appropriate hardware can run my code

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 16
(2,400 Views)

Go to the View in the menu and and open "Event Inspector Window"

 

I have not looked in detail at your code, but you have multiple event structures and value signaling properties. I wonder if your Event is getting triggered twice, then two acquisitions.

 

The Event Inspector Window has a log of events, check if that is the case.

 

mcduff

 

0 Kudos
Message 6 of 16
(2,394 Views)

Can someone inline a png or snippet?  

 

My 8-Ball is telling me that you are making a simple mistake and probably should be using a start-fetch rather than a start-wait-read.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 16
(2,388 Views)

snip.png

Message 8 of 16
(2,386 Views)

Dang,  I still can't tell from my phone...McDuff, can you print the lower loop and inline the png?


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 16
(2,382 Views)

Sorry, just left the office without  LabVIEW.

0 Kudos
Message 10 of 16
(2,380 Views)