High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do acquire different video lines

Solved!
Go to solution

Dear AE,

 

I am working on acquiring multiple consequent composite video lines by using Multi. Records with my PCI-5122 module.  

I have done with several different ways to program the video trigger with different line number configuration.

 

I have attach my LabVIEW, it is by LabVIEW 2009.  Can you help me check?

 

Thanks in advance,

0 Kudos
Message 1 of 20
(7,579 Views)

Hello Vincent,

 

I was wondering if you could point me in the right direction for what you wanted checked in your code? Are you running into any issue while running your code, getting noise or other issue? Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 2 of 20
(7,547 Views)

Dear Adam,

 

Sorry, I should make clear with my question.

 

I am intending to acquire several continuous video lines for my later on processing.  I have refer to one of the existed examples codes came with NI-Scope installation which shows how to use video trigger of NI-5122 module, although it works, but will take longer time if I acquire more video lines, since, it needs time to transfer each acquired video line back to PXI controller’s main memory.

 

Therefore, I hope I am able to use continuous triggers to acquire my specified continuous video lines, and save those acquired video lines in NI-5122 onboard memory; each video line in one record.  For example to acquire video lines from line 31 to 40, I try to re-configure the “niScope Configure Trigger.vi” with different video line number each time after saving that acquired video data in corresponding “record”, then retrieve all the records back to PXI controller memory.

 

My program can be executed, but always hold the same last trigger acquired video data across all the records. As same example I mention above, I expect to have 10 records after my program execution; record 1 holds video line 31, record 2 hold video line 32,…record 10 holds video line 40.  Unfortunately, I find all the 10 records have same video data which is video line 40.

 

I hope my above description will help you clear with my purpose of my labVIEW program, and help me resolve the problem.

 

Thanks for the assistance in advance,

 

Vincent

0 Kudos
Message 3 of 20
(7,513 Views)

Hello Vincent,

 

In your example you have the line number set to 40, is it always like this or do you set it at 30 for the start of your code? Also if you only fetch 9 records does it show the last record there as well?

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 4 of 20
(7,497 Views)

Hi Adam,

 

Yes, I will give any number to the "line number" control, and since I wired "number of records" to both "niScope Configure Horizontal Timing.vi" and "for loop" to make consistent of "trigger number" and "data records", and fetch ALL records at once.

 

In order to make clear with my experiment, I use a known video matrix pattern with color bars pattern at some video lines and luminance bars at other video lines, then I can setup "line number" and "number of records" properly to acquire both color bars and luminance bars pattern.

 

I will also configure "min sample rate" to 100 MS/s and "min record length" to 6600 samples, since one video line length in NTSC standard will be approximate to 65 uS.

 

I think the problem could be related to "niScope Configure Video Trigger.vi".  I am not sure if I can keep changing the "trigger condition" in such continuous triggering mode with my NI-5122 module.

 

Look forward to your further comment.

 

Thanks,

Vincent

0 Kudos
Message 5 of 20
(7,492 Views)

Hello Vincent,

 

I have a VI that I think may work out for you, I have not tested it out though. This should give you the 101 records that you are trying to get. Let me know if this works out for you. I am also attaching one that will get one record. Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 6 of 20
(7,474 Views)

Hi Adam,

 

I have test run with your both programs, although they are working, however, their functionality are not what I am looking for.

 

For example the "Scope Video trigger multirecord increment lines.vi", it will retrieve each record of triggered video data from starting of line to end of line.  Although it works to acquire all the video lines, but it takes nearly 30 second to acquire 30 video lines.

 

Do we have way to KEEP each triggered video data in corresponding RECORD, and retrieve all records after triggered acquisition is complete?

 

Thanks,

Vincent

0 Kudos
Message 7 of 20
(7,467 Views)

Hello Vincent,

 

I was wondering what is the rate your are sampling at? And also how many samples are you taking per record? Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 8 of 20
(7,425 Views)

Hi Vincent,

 

Unfortunately, the exact behavior you are looking for is not supported. For your application, you are trying to perform a multi-record triggered acquisition, which basically means that you specify a number of records to acquire and you wish for the digitizer to trigger each record at the appropriate time (beginning of each new video line), and store each record in the onboard memory until you fetch it. The advantage of this method is the ability to rearm and trigger at quicker rates without software interference (ie - the need to reconfigure each time). However, being able to increment your video trigger by a line each time is not possible and thus will not work with multi-record acquisition. Also, to clarify on your original VI you posted, if you set your records to acquire to be 100, you do not need to use a For Loop to initiate the acquisition each time; for a multi-record acquisition, once you initiate, the hardware will trigger, acquire, and repeat the process for the number of records you specify without any additional software intervention. The only time you would need a loop is to fetch the data off the board if you are not fetching all 100 records at the same time (such as if you wanted to fetch maybe 10 at a time). In your case, you were telling it to acquire 10 records off a trigger at a specific line, then you looped and configured the trigger for the next line number, so it would take 10 more records at that line number, and so and so forth until the last line triggered. So instead of taking 10 records, you were taking 10 records off each line, and they were all independant acquisitions. This is why when you fetch at the very end, all the digitizer gives you is 10 records of the very last line you configured to trigger on.

 

For your application, it seems like the best solution is to trigger off the very first line and do a large, single acquisition to take every single sample in the frame (or whatever you are interested in), then simply process the samples in software to take just the portion(s) of the signal you want (ie - chunks of 6600 samples beginning at the start of each line). Hopefully, whatever video format you are using is deterministic and will allow you to be able to easily divide your data up based on the time of each line and the time between lines.

 

Do you know approximately how long it takes to run through the 10 or 100 sets of lines you wish to acquire at one time? Obviously the limitation of the method above is that you will be sampling much faster than you can transfer the data across a standard PCI bus. However, you can fetch data as you acquire it, and if you are only sampling a finite number of lines from your video signal, it should mostly be able to fit in the onboard memory of the device. If this is something you need to be done completely continuously, you will probably not be able to sustain the acquisition. Hope this helps,

Daniel S.
National Instruments
0 Kudos
Message 9 of 20
(7,423 Views)

I realized how confusing my first paragraph is. Let me try to explain myself a little better.

 

If you set your number of records to acquire (on the Configure Horizontal Timing VI) to be, let's say, 10 records, then when you call an Initiate, it is going to acquire 10 records into the onboard memory of your device without the need to reconfigure anything or have any form of software intervention. At that point, the acquisition will indicate that it is complete. In your case, you are putting the Configure Video Trigger and the Initiate in a For Loop. Thus, the following sequence will happen (assuming you specify 10 records to acquire and you start configuring the video trigger on line 31 of your video signal):

 

For Loop iteration 1: You will acquire 10 records into onboard memory, all beginning at line 31.

For Loop iteration 2: You will acquire 10 records into onboard memory, all beginning at line 32. Since this is a new acquisition, the previous 10 records are discarded.

For Loop iteration 3: You will acquire 10 records into onboard memory, all beginning at line 33. Since this is a new acquisition, the previous 10 records are discarded.

For Loop iteration 4: You will acquire 10 records into onboard memory, all beginning at line 34. Since this is a new acquisition, the previous 10 records are discarded.

For Loop iteration 5: You will acquire 10 records into onboard memory, all beginning at line 35. Since this is a new acquisition, the previous 10 records are discarded.

For Loop iteration 6: You will acquire 10 records into onboard memory, all beginning at line 36. Since this is a new acquisition, the previous 10 records are discarded.

For Loop iteration 7: You will acquire 10 records into onboard memory, all beginning at line 37. Since this is a new acquisition, the previous 10 records are discarded.

For Loop iteration 8: You will acquire 10 records into onboard memory, all beginning at line 38. Since this is a new acquisition, the previous 10 records are discarded.

For Loop iteration 9: You will acquire 10 records into onboard memory, all beginning at line 39. Since this is a new acquisition, the previous 10 records are discarded.

For Loop iteration 10: You will acquire 10 records into onboard memory, all beginning at line 40. Since this is a new acquisition, the previous 10 records are discarded.

Exit For Loop and call Fetch function: You will fetch the last acquisition from memory, which consists of 10 records, all of which are line 40.

 

Please let me know if I explained this properly, and if there is anything else I can help to explain more clearly. Best regards,

Daniel S.
National Instruments
0 Kudos
Message 10 of 20
(7,420 Views)