NI VideoMASTER and NI AudioMASTER

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture a frame with PQA

Solved!
Go to solution

Hey guys, i'm stuck in my project because of this problem.

 

i'm trying to acquire and save a single frame using NI PXIe-1491 and NI PQA, I have already configured the "frames to process" to 1 and everything else correctly on the Provider tab. I'm trying to save that frame using the in user processor, the VI attached below. I`ve have already converted to LV 2012 because the NI PQA ask for that version when I tried to execute the process. I'm receiving a error code 1124. It says that i'm using a polymorphic VI, but i'm not, as you can see in my VI. The other possible reason for that error is that the VI was compiled in a different OS, which don't make sense since I'm using the same PXI to create the VI and execute de NI PQA.

 

Can some one help me out ? If someone knows any other way to acquire a single frame using other method please share it.

 

Thanks in advance!

0 Kudos
Message 1 of 4
(9,189 Views)
Solution
Accepted by topic author rk_tinelli

Hi rk_tinelli,

 

I'm not seeing the particular error you're getting, but my guess is that the "converted" VI for LV 2012 (assuming you're using the files you got from the forum) did not also include the subVIs. Your savefile.vi calls the two IMAQ functions from vi.lib, which are still compiled in LV 2015. Instead, if you don't have LV 2012 installed, what you need is a source distribution that includes the files from vi.lib compiled for LV 2012.

 

With some tweaking, I got your code to work with PQA's user provider (attached). I used the User Processor template provided with PQA. I copied your code for saving the frame to a JPEG into the template, but I wired the file path to a control to get it in the form that PQA expects. The connector pane has to match the template for PQA to load it, and (apparently) you have to have at least one control in the configuration.

 

Try niPQA User Processor Save Frame.vi in the attached zip and let me know if it works for you.

 

Another option might be to use Video Measurement Suite (VMS) instead of PQA. VMS acquires one frame at a time, and allows you to directly save the frame as a jpg/jpeg. VMS wouldn't be a good choice if you need the triggering in PQA or if you're looking for a particular frame in a streaming video, but if you're using a static video pattern then VMS might be a simpler option.

Message 2 of 4
(9,181 Views)
Hey k_Joy Sorry for taking so long to answer you here,I was out of office for a couple days. I tried the VI you attached and it worked 😄 Just curious here, what version of LabVIEW are you using ? Many thanks for the help! Now I can continue my project 😄
0 Kudos
Message 3 of 4
(9,138 Views)

Glad to hear it! I created the source distribution in LabVIEW 2012 SP1.

 

FYI, I created the source distribution as a flat directory, but I could also have created it as an LLB, as described in KnowledgeBase 5KSETS01: Using the NI Picture Quality Analysis (PQA) LabVIEW VI Templates. Either option requires you to install and use LabVIEW 2012 SP1, though.

0 Kudos
Message 4 of 4
(9,127 Views)