LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Scope: programmatically set Mode of Trigger Settings

Solved!
Go to solution

Dear all,

 

I try to find a VI or property node with which I can set programmatically the Mode of the Trigger Settings so that I can chose between Norm, SGL and Auto – see attached picture.

 

I know that I can use for example the "niScope Configure Trigger (poly).vi", but this enables me only to set trigger coupling, trigger slope, trigger source and so on, but not the trigger Mode.

I hope somebody here can tell me where this option is hidden.

0 Kudos
Message 1 of 11
(4,113 Views)

I think a combination of the information at this link: http://www.ni.com/product-documentation/3382/en/ and a case structure should be able to do what you want - identify the different VIs that produce different triggering types, or the place where that dropdown menu is wired to, and then implement whatever change you want, possibly using a case structure. 


GCentral
0 Kudos
Message 2 of 11
(4,021 Views)

Thank you for your reply!

 

You write

identify the different VIs that produce different triggering types

 

I think only the "niScope Configure Trigger (poly).vi" defines trigger types.

From these trigger types I use the "Analog Edge Ref Trigger" with the following settings:

Type: Edge

Coupling: DC

Source: ch 0

Slope: positive

Mode: Auto

 

Setting the first four parameters is no problem at all (my program runs well)!

But I also want to set the Mode to Auto.

But how? I cannot find a VI or a property node with which I can do this.

 

You write

identify… the place where that dropdown menu is wired to

 

I would love to identify this. However, I cannot see the code/block diagram of the NI-SCOPE.

And I do not see how a case structure shall help here. For sure, I can create a button with these cases but this must be connect to somewhere to force my oscilloscope to be in the Auto Mode (and not in SGL or Norm – the behavior is very different).

 

Is there any way to select somewhere the Mode? Perhaps this is very well hidden in LabVIEW and different names are used so that I cannot find it. Or is this option really not implemented in the NI-SCOPE VIs?

If so, how can I imitate the different Modes?

0 Kudos
Message 3 of 11
(4,014 Views)

@partial81 wrote:

 

 

I think only the "niScope Configure Trigger (poly).vi" defines trigger types.

From these trigger types I use the "Analog Edge Ref Trigger"

 

 

You write

identify… the place where that dropdown menu is wired to

 

I would love to identify this. However, I cannot see the code/block diagram of the NI-SCOPE.


Ah. Well, my first point was related to the poly VI you mention - what are the other options? The documentation here lists  immediate, software, hysteresis, edge, window, video, and digital triggering, but I guess you already looked at the other options.

 

With regards to your second block-quote - my apologies, I didn't know that the NI-SCOPE block diagram was locked/removed. Reading the documentation made me believe that these must be accessible.

 

Now I'm really rather confused. Are you completely replacing the NI-SCOPE program? It sounds rather like that is your only option if you can't make changes to the existing BD, but perhaps I'm wrong again?


GCentral
0 Kudos
Message 4 of 11
(4,008 Views)

Wow – that was a quick reply. Thank you!

Thank you also for your list with the options. I took a look there but I could not find anything helpful.

 

Yes, it is a pity that the NI-SCOPE block diagram is locked. I am even not sure if the NI-SCOPE soft front panel is written with LabVIEW. I asked once another question about NI-SCOPE and somebody wrote here that it is not written in LabVIEW (similar answer here).

Perhaps this is the reason why I cannot find something in LabVIEW to set the Mode...

Are you completely replacing the NI-SCOPE program? It sounds rather like that is your only option if you can't make changes to the existing BD, but perhaps I'm wrong again?

 

Yes, you are right. I used the NI-SCOPE soft front panel to see what settings I have to use. Then I wrote my own LabVIEW program which replaces the NI-SCOPE program (and which is optimized to my needs).

My program is based on this screenshot here (from this post here; somewhere one can find the code belonging to the screenshot).

Unfortunately, as said, I cannot set the trigger mode in my program and I do not see with which VI or property node I can do this (I even do not know if this is possible at all).

0 Kudos
Message 5 of 11
(4,004 Views)

It seems nobody knows a solution for my problem 😞

 

But perhaps somebody can give me hints how to program a workaround to achieve that my program does the same as the NI-SCOPE Soft Front Panel when the trigger mode is set.

 

My NI-oscilloscope is connected with a wire to some source to measure the voltage.

Depending on the mode, following happens:

SGL: If my voltage exceeds the trigger level, a measurement is started once. The trigger has to be armed manually again for the next measurement. So far, I do not need this behavior, so this mode is not so important for me.

Norm: The voltage is measured all the time – when I disconnect the wire, the last measured curve is still visible on the NI-SCOPE Soft Front Panel.

Auto: The voltage is measured all the time – when I disconnect the wire, the last measured curve disappears from the NI-SCOPE Soft Front Panel.

 

My program, which is based on the code visisble here (post here), is always in the Norm-Mode. But I want it to be in the Auto-Mode. How can I achieve this?

0 Kudos
Message 6 of 11
(3,963 Views)
Solution
Accepted by topic author partial81

Do you get a timeout error at the Read when you disconnect the wire? If so, it might be that clearing that specific error before you allow it to stop the loop will continue the read and place default output on your graph/chart.


GCentral
0 Kudos
Message 7 of 11
(3,960 Views)

Thank you for your reply!
I like your idea because this is something I could use. But there is no timeout error 😞

0 Kudos
Message 8 of 11
(3,954 Views)

What is produced on the output of the Read (shown to the Waveform Graph in the image you linked) when the timeout occurs? And what value do you have for timeout (it might be that the default is -1 and corresponds to no timeout, or similar).


GCentral
0 Kudos
Message 9 of 11
(3,949 Views)

OK, I'm going to let you off the hook 

 

the SFP for NI Scope fakes everything about that enum <Auto, Norm, Off> and initiates a read? once, once while triggered or just once, once, once......


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 11
(3,940 Views)