Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-6682 => IRIG and create clock

Hello,

 

This is probably a very basic question....I am trying to find out the way to create a clock for timestamping at certain intervals using the IRIG signal instead of the 1588.

 

 

When using 1588, here was what i was doing:

- I start (nisync_start1588),

- Wait for the 6682 to be stable (Master/Slave)

- Get the 1588 clock precision (NISYNC_ATTR_1588_CLK_RESOLUTION - nanosecond precision)

- Get number of ticks per second needed for the high and low of the timestamping clock.

- Create the clock....(nisync_createclock)

- Start timestamping (nisync_EnableTimeStampTrigger)

 

Now, I have to make the same operations but using IRIG-B instead. My plan is:

- Set time reference (niSync_SetTimeReferenceIRIG with PFI0 as termnial)

- Get the clock precision (NO idea how to do this)

- Create the clock (nisync_createclock)

- Start timestamping (nisync_EnableTimeStampTrigger)

 

Do you have any idea on how to do this? Or is my solution flawed for some reason?

 

Thank you,

 

Frederick

0 Kudos
Message 1 of 5
(3,658 Views)

Hi.

The internal clock for the PXI-6682 is always 100MHz, so the clock resolution is always 10ns, regardless of what the synchronization source is.

 

The property name "NISYNC_ATTR_1588_CLK_RESOLUTION" is misleading, as it implies that it applies only when using 1588 as the sync sourc, but it actually returns the clock resolution for the internal timekeeping clock, which is always 10ns.  Actually, in LabVIEW the property is more appropriately simply named "Clock Resolution".

 

So, you can either assume the clock resolution to be 10ns, or use the same property to get your resolution, even when using sync sources other than 1588 (IRIG-B, GPS, PPS).

 

Hope this helps.

 

Regards,

 

AlejandroZ

0 Kudos
Message 2 of 5
(3,646 Views)

Hello,

 

Thank you, this is exactly what i was looking for. i was under the impression I had to start the 1588 but using IRIG as time reference for it to work.

 

If I understand properly, I only need to call niSync_SetTimeReferenceIRIG, create a clock based on the 10ns resolution and feed this new clock to the niSync_EnableTimeStampTrigger to start timestamping at the desired frequency...

 

For information, this program is written in VS2003 C++, using NiSync 3.0

 

Frederick

0 Kudos
Message 3 of 5
(3,644 Views)

Hi.

Yes, you can assume that the resolution will be 10ns and just set the time reference to IRIG.  There is no need to start 1588.

 

However, I don't quite understand what you are trying to do overall.

 

The CreateClock function allows you to configure an IO line as an output and drive a clock with a certain period and duty cycle on that output.

 

The EnableTimeStampTrigger function allows you to configure an IO line as an input and log timestamps of incoming events occurring on that input (rising edges, falling edges or both).

 

So, I don't quite understand when you say "start timestamping at the desired frequency".  You will get timestamps whenever your input has an edge, but that has nothing to do with the clock you are generating, unless you are timestamping the clock that you are generating, but that doesn't make sense, since you are generating it and you know what times you programmed the edges to be at.

 

Could you explain a bit more what it is you are trying to accomplish?

 

Thanks,

 

Alejandro

Message 4 of 5
(3,641 Views)

Hi,

 

Overall the system goes like the following:

 

- Have 6x 6224/6143 in a PXI chassis + 1x 6682. They sample signal from 10kHz to as much as the cards can give (always same sample rate for one test)

- I have to timestamp each block of data (block is of variable length and can change between tests)

- Basicly, I build a clock to generate a timestamp for each block of data as opposed to generating a timestamp at each data.

- As I gather the blocks of data from the PXI cards, I get the associated timestamps.

 

Hope this clarifies the situation...

 

Frederick

0 Kudos
Message 5 of 5
(3,623 Views)