LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PFI 1 as input on NI USB-5132/5133

Dear forum members,

 

I use the NI USB-5132 with the LabVIEW NI-SCOPE VIs. I read signals from channel 0 and 1. So far everything of my code works well.

Out of some reason I need to register a third, logical (TLL) signal during my measurements. I should know if this signal is high or low.

Can I (ab)use the PFI 1 channel for this? I tried this, but I found no solution at all. But I think this should be possible because I can use the PFI 1 channel as trigger. I just do not want to use it directly as trigger, I only want to know its state.

So, does anybody of you know if you can read out/record if the PFI 1 channel is high or low?

I would be very happy to get hints or even some little programming example for this problem!

0 Kudos
Message 1 of 8
(3,781 Views)

If I cannot use the PFI 1 to detect if the input signal is high or low, I would like to do the opposite:

In this case I would like to use the PFI 1 as output to generate a logical signal (e.g. a signal that is either on 0 V or on 3 V).

I also tried to generate such a signal, but so far I could not find any solution for this. All I can generate is a short, repeating pulse.

Could anybody here explain me, how I can generate such a signal so that I can still read the signals from channel 0 and 1 next to it?

I would appreciate any help for both of my problems a lot!

0 Kudos
Message 2 of 8
(3,766 Views)

Dear partial,

 

the Trigger Input can not be used as an Output.

Nor can it be used as an contineous Input.

 

It is hard wired as a trigger for starting measurements and as such you can use it.

 

You would need a device with more input channels or a second device to solve your issue.

 

Best wishes

Tenshinhan

--------------------------------------------------------------------------------------------------------
Work with NI Hard- and Software for about 15 years now.

Certified LabVIEW Developer & TestStand Developer/Architect

--------------------------------------------------------------------------------------------------------

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Message 3 of 8
(3,743 Views)

Dear Tenshinhan,

 

Thanks a lot for your explenation!

It is a bit disappointing to hear this but it is also good to get such a professional answer from a NI specialist.

 

I had the idea to generate just one pulse with the niScope Export Signal.vi (see attached example code). This would be helpful too.

But I also cannot solve this problem and I am not sure if your answer fits for this problem too.

In my code I can press my button "Generate Pulse" and pulses are generated ("Start Trigger" is given to the niScope Export Signal.vi).

But when I press my button again so that "None" is given to the niScope Export Signal.vi, still pulses are generated.

I really do not understand why.

Do you have an explanation or even a fix/better programming code for this problem?

 

Would be great to hear again from you!

0 Kudos
Message 4 of 8
(3,734 Views)

Hi,

 

you can only configure the Trigger Line as none in the "off" State.

So you will have to abort the Scope Task, configure it new and then start it again.

 

Best wishes

Tenshinhan

--------------------------------------------------------------------------------------------------------
Work with NI Hard- and Software for about 15 years now.

Certified LabVIEW Developer & TestStand Developer/Architect

--------------------------------------------------------------------------------------------------------

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 5 of 8
(3,730 Views)

Dear Tenshinhan,

 

Thanks for the hint.

I tried to implement your suggestion in my code (see attachment).

When I want to start or stop the pulse, the acquisition is aborted first.

But it still does not work – I can start to generate the pulses but I cannot stop it anymore.

Can you or somebody else tell me what mistake I make?

0 Kudos
Message 6 of 8
(3,724 Views)

Hi!

I think I found a solution.

 

Instead of using the niScope Abort.vi I use the niScope Disable.vi.

With this vi I can generate single pulse whenever I want to (see attached code).

 

But it is ok to use the niScope Disable.vi in this way?

And why does the niScope Abort.vi not work for me?

 

Would be great to hear some explanation or other hints!

0 Kudos
Message 7 of 8
(3,718 Views)

Hi!

 

By chance I found the "niScope Probe Compensation Signal Start.vi" and "niScope Probe Compensation Signal Stop.vi" (see attached example code).

With these Vis I can generate a 1 kHz square wave output on PFI 1 whenever I want. This is extremely useful for me and solves my problem!

 

I hope it is ok to generate the pulses for long time on my NI USB-5132 – does anybody of you have experience with this?

Does anybody know why it is not possible to change the frequency/the duty cycle or the amplitude of this signal? I do not really need this, but somehow it would be interesting to understand the reason.

0 Kudos
Message 8 of 8
(3,661 Views)