Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

start and stop on board clock

I have a NI PXI-6552  and I need to be able to start and stop the on board clock. I can't find a function to do this. It stays free running even when my vi isn't.

kph
0 Kudos
Message 1 of 7
(4,109 Views)

Hi KPH,

You cant "stop" the onboard clock but you can choose to not export it.  Is this what you want to do?  To change where the clock is exported or to not export it you use the niHSDIO Export Signal.vi.  Keep in mind you always need a free running clock or the board will error so if you were to stop the onboard clk while it is being used as the sample clock you would get an error.

If this doesn't solve your problem, explain more about what you need and why.


Brian

Message Edited by BrianPack on 03-14-2006 10:41 AM

0 Kudos
Message 2 of 7
(4,101 Views)
I assumed as much. I'm using the on board clock as the clock for my serial device. When I'm not actively using the serial port I want to stop the clock to limit noise coupling. I suppose I could use another channel instead of using the clock out, but from a software prespective it's much easier to just use the on board  clock.

kph
0 Kudos
Message 3 of 7
(4,091 Views)
Hey kph.  Just another quick note about the clock.  BrianPack is correct - you can decide whether or not to export the clock in SW... just make sure you call "niHSDIO Commit.vi" after calling "niHSDIO ExportSignal.vi" to actually commit the settings to HW and physically stop the clock.
 
Making a clock signal out of a data line is a fairly common tactic when people need the clock to start/stop or want to produce a clock at a different rate than their internal sample timebase.  The ExportSignal method depends on SW timing, while a clock on a data line can have very precise timing.  The Digital Waveform Editor can be useful in helping you create your pattern to add clock and control signals to your data sets.
 
Another possibility would be that if your device has some kind of chip enable, you can use the DataActive to tell the device to pay attention to the clock.  Alternately, you could AND the clock and the data active event externally.
 
Hope some of this helps.
Chris
0 Kudos
Message 4 of 7
(4,080 Views)
I used the niHSDIO reset.vi to stop exporting the clock. Is this good practice or is there another preferred method?

kph
0 Kudos
Message 5 of 7
(4,078 Views)
Resetting the device will definitely stop the clock.  It will also stop every other operation you may have going on (an acquisition session for example). 

The cleanest method is to use the niHSDIO Export Signal function.  Your inputs should be to export the "sample clock" and "Do not export signal".  In many of the examples shipped with NI HSDIO, this method is used to "stop the clock" at the end of a task.  You could refer to example code "Dynamic Generation with Exported Clocks.vi"  You'll notice that the very last step is to call the export function with a "do not export signal" input followed by a commit.
0 Kudos
Message 6 of 7
(4,076 Views)
Thanks. I figured there had to be a cleaner method. I initially tried to stop exporting the clock but got an error. I guess I need to add the commit vi.

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