PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

trigger in pxi 6542

Hi

 

I am working with the pxi 6542.I am currently using a start trigger from 1st clock cycle when pattern matches and pause trigger at the end of the 32nd clock cycle when pattern does not match.

However, I would like to acquire data from 16th clock cycle until 32nd clock cycle. Right now, with the current setup of start and pause trigger that I have, I am acquiring all 32 samples which I would not like to do.

Please suggest me some way by which I could read from 16th clock cycle to 32nd clock cycle.

 

I have attached the timing diagram for better understanding.

 

Thanks in advance for your help!

 

0 Kudos
Message 1 of 12
(3,960 Views)

Testough,

 

Have you tried the "fetch offset" property?  This will still acquire the 32 samples and store them into on board memory but if you set the offset to 16, the fetch vi will return an array that starts on the 16th sample.

 

Dynamic Acquisition:Fetch:Fetch Offset Property

Short Name: FetchOffset

Property of niHSDIO

Specifies the offset in samples to start fetching acquired waveform data. The offset is applied relative to the Fetch Relative To position. Offset can be a positive or negative value.

If the specified offset would cause the fetch to occur before the start of the waveform or exceed the end of the waveform, NI-HSDIO returns a data overwrite error.

This property is valid only for acquisition sessions.

Remarks

The following table lists the characteristics of this property.

Datatype iL
Permissions Read/Write
High-level VIs N/A
Channel-based No
Resettable No
0 Kudos
Message 2 of 12
(3,949 Views)

Hi Ryan

 

Thanks for your reply!

 

I tried using the fetch offset property but still it acquires only 32 samples. Any thoughts on this?

0 Kudos
Message 3 of 12
(3,942 Views)

Hey testough,

 

Have you tried changing the number of "Samples to Read" input into the Fetch Waveform VI?

 

Regards,

DJ L.

0 Kudos
Message 4 of 12
(3,937 Views)

I am trying to read 32 samples (based on my trigger configuration), but I would like to transfer samples 16 - 32 to the PC memory.

0 Kudos
Message 5 of 12
(3,934 Views)

Hey testough,

 

You can set up the HSDIO device to read 1000 samples into the onboard memory of the device, but when you Fetch them off of the device into the PC memory, you can configure which samples you want to fetch. So if you want to fetch samples 8 - 16, you can set the fetch offset to be 8, and the number of samples to fetch to also be 8. This does not mean that the HSDIO device will only acquire 8 samples, it will still acquire all 1000 samples, but it means that you are deciding how many samples to fetch from the HSDIO device into PC memory. Let me know if you are still confused by this. Thanks.

 

Regards,

DJ L.

0 Kudos
Message 6 of 12
(3,932 Views)

Thanks for your help DJ.I am clear with your explanation but when I change the samples to read to 8 and fetch offset also to 8, am not able to get the data out from the fetch.vi.The data array is empty.

0 Kudos
Message 7 of 12
(3,924 Views)

Hey testough,

 

Can you send me your sample code so I can take a look at it?

 

Thanks,

 

Brandon G

Applications Engineering

National Instruments
Precision DC Hardware Engineer
0 Kudos
Message 8 of 12
(3,907 Views)

Hey Brandon

 

I figured out the problem of empty array and fixed it.

 

 When I make the block transfer as 1 for my data, fetch offset works as expected.But,if I have my block transfer as 128, offset by 16 only offsets first 16 bits. So how can I use fetch offset with block transfer?

My aim is to offset first 16 bits in every sample of the block transfer.

 

Thanks in advance for your help.

0 Kudos
Message 9 of 12
(3,900 Views)

Hi testough,

I am a little unclear of your explanation.  Are you trying to offset the samples you're fetching from the onboard memory, or are you trying to bit shift each sample by 16 bits?  Can you send me your snippet of code so I have a better understanding of what we're trying to do?  Also, have you by chance seen the Dynamic Acquisition with Fetch Options.vi example in NI Example Finder?  This maybe a good starting point to see if your code is structured similarly.

 

Thanks!

Brandon G

National Instruments
Precision DC Hardware Engineer
0 Kudos
Message 10 of 12
(3,880 Views)