Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PFI5 or PFI7 external clock

 

Hello.

 

I am using a 6031E NIcard and I am supplying an external clock to the PFI7 pin and declaring it in the Sampling function 

 

DAQmxCfgSampClkTiming.

 

I read in a website that PFI7 should not be used (only PFI0-6) for external clock. I am thinking of using PFI5 instead of PFI7.

 

This post is a continuation of my last theme in this link,  DAQmxCfgSampClkTiming.

 

A year passed and I made some changes but I never solved the issue and I still have hardware/software problems although this time I am finally acquiring data on the screen.

 

For the moment I just want to know if I should be supplying the external clock to the PFI5 (PFI0-6) instead of to the PFI7 pin.

 

Let us go step by step this time.

 

Thanks.

 

JC.

 

 

 

0 Kudos
Message 1 of 12
(4,114 Views)

Hi,

Could you say me where do you found that PFI7 should not be used for external clock? Could you share the link?

Thanks Samuel GUESNE

Samuel G. | GEMESIS

Certified LabVIEW Architect

Certified TestStand Developer

GEMESIS.EU

0 Kudos
Message 2 of 12
(4,105 Views)

 

Hi it is here but I read it wrong:

 

http://www.beam.org.uk/files/opensource/pci-6143/docsource/S_Series_Help.chm/AI_Sample_Clock_Signal....

 

In this phrase I thought it was saying that any PFI0....6 instead of any PFI which is what it really says. I got confused with the RTSI 0...6

 

Using an External Source

You can use a signal connected to any PFI or RTSI <0..6> pin as the source of ai/SampleClock.

 

So therefore I take it that you can use the PFI7 for supplying the external clock?

 

Basically if I declare it as external, rising edge, dev1/pfi7 it should work equally as well as as when I supply it to the PFI5. Is that correct?

 

Thanks,

 

JC.

 

 

 

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

Exactly, you can use a signal connected to any PFI.

 

As you can see form the attachment (it is device routing in max), any PFI could be use as external source.

 

Regards

Samuel GUESNE

Samuel G. | GEMESIS

Certified LabVIEW Architect

Certified TestStand Developer

GEMESIS.EU

0 Kudos
Message 4 of 12
(4,099 Views)

 

Thanks.

 

I am trying to run the external clock to see if I get data and I am currently using the following example from NI.

 

It states that I need to inform the NICARD via a trigger to pfi0.

 

I am trying that now.

 

Therefore I assume the trigger is mandatory then? I should use a trigger to inform the NICARD that the clock is starting?

 

I thought once I started the task with the AISampling function, the nicard would acquire a sample after each rising each without having to supply a trigger?

 

My external clock has 129 rising edges (i only want 128 samples though per read) and I start the synchronisation by sending a char "r" from PC to microcontroller, and this microcontroller sends a clock to NICARD but all this is in a FOR loop at the moment.

 

May be the synchronisation is not right.

 

Regards,

 

JC.

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 5 of 12
(4,095 Views)

You can use the external clock without trigger. It is not mandatory.

 

Let me know about your test.

 

Samuel G.

Samuel G. | GEMESIS

Certified LabVIEW Architect

Certified TestStand Developer

GEMESIS.EU

0 Kudos
Message 6 of 12
(4,088 Views)

 

I have not done the test yet in proper conditions.

 

However, before I do that test I ask two other questions:

 

1) I am using an ATMEGA128 microcontroller to generate the external clock to PFI7-AISampleclock. That should be ok right?

 

2) At the moment my AIGND is wired to the GND of my PCB. Should AOGND be also wired to GND of my PCB or AIGND? I used to have in the past DGND wired to AIGND but I saw less noise on my User Interface application when I removed the connection between DGND and AIGND.

However, my question now is if I should have AOGND wired to GND or shall I leave it unconnected?

 

Thanks.

 

J.C.

 

 

0 Kudos
Message 7 of 12
(4,071 Views)

Hi,

 

You can use your ATMEGA128 microcontroller, it should be right.

 

Wire the GND of your PCB to D GND, you don’t have to wire D GND to AIGND.

 

Regards

Samuel G.

Samuel G. | GEMESIS

Certified LabVIEW Architect

Certified TestStand Developer

GEMESIS.EU

0 Kudos
Message 8 of 12
(4,058 Views)

 

The GND of my PCB is already wired to AIGND because I acquire in differential mode two analog voltages from the input voltages entering ai0, ai8 (1st differential voltage) and ai1, ai9 (second differential voltage).

 

My DGND is currently not wired to the GND of my PCB or same thing as wired to AIGND because I saw more noise.

 

Basically I just have AIGND wired to the GND of my PCB. Not DGND. If I wire DGND too, more noise appears.

 

Is it ok then? Any suggestion on this issue here?

 

Regards,

 

Javier.

 

0 Kudos
Message 9 of 12
(4,054 Views)

Hi,

 

Actually, if you wire the D GND with A GND you can have some problems. Consequently you should use two different ground plane.

 

Regards Samuel G.

Samuel G. | GEMESIS

Certified LabVIEW Architect

Certified TestStand Developer

GEMESIS.EU

0 Kudos
Message 10 of 12
(4,050 Views)