LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed loop external timing source

Hi,
 
Here is what i'm trying to do:
 
Set up an external timing source for a timed loop to iterate(Send a serial command) on every rising edge of a pulse.
 
Here is what i done:
 
Using Daqmx VI: Daqmx Create Channel(DI) to create the task that contain the input channel where my signal goes(PFI0, Port1, line0) and then pass the Task information to Daqmx Create timing source(Signal from task). I wired the Timing source out to the Source name of the timed loop.
 
Nothing happen!?
 
Could somebody tell me what i'm doing wrong?
 
Regards,
 
Guillaume
0 Kudos
Message 1 of 4
(3,101 Views)
Hi Guillaume,

I had a few questions about your application. You mentioned that you trying to send a serial command but created a digital input task. Also, do you have your DAQmx Read or DAQmx Write in the timed loop? To get an idea of a few working examples, you can look in the Example Finder. The Example Finder can be accessed through the Help menu and the DAQmx examples can be found browsing by task under Hardware Input and Output » DAQmx.

If you could give some additional information such as your hardware and what you currently have in your program, it would be help us to give you more specific aid.

Regards,
Kent
Applications Engineer
0 Kudos
Message 2 of 4
(3,078 Views)

Hi Kent,

I know that it is not usual the way i want to do things...

The main goal is to synchronize a serial instrument query based on a GPS Pulse per second.

I changed the strategy and here is what i've done(And it's working as i want): Configure an Analog input task timed with the PFI0 input(GPS PPS) and set the Daqmx Create timing source(Signal from task) with that task. This is based on a Labview example.

A timed loop now start an iteration each time a GPS pulse is issued and then a query is sent to my instruments base on that GPS event.

I do not read the analog data because i dont need that information. What is a bit annoying is to use an analog input ressource for nothing.

Do you have enough informations to understang what im trying to do?

Do you have any advices?

By the way, I'm using a PXI-6220 board.

Regards,

Guillaume

0 Kudos
Message 3 of 4
(3,065 Views)
Hi Guillaume,

Thanks for the additional information. It sounds like you have a pretty good handle of what you are trying to do now. The data acquisition task is required since it is specifies how the virtual channel is configured so the computer will be monitoring the input for your signal. If you wanted more information on the task structure in DAQmx, you can check out this article or the NI-DAQmx Help file. The way you currently have your program seems to work just fine. One suggestion may be the use of DAQmx event structure which will generate a trigger in software when a certain condition has been met. There is more information on DAQmx events here and are a few examples utilizing these functions in the Example Finder.

Regards,
Kent
Applications Engineer
0 Kudos
Message 4 of 4
(3,034 Views)