06-19-2008 05:41 AM
06-23-2008 08:03 AM
Hi Eduardo
Thanks for contributing.
I've peeked up your block diagram and it feels like you are abusing of the DAQmx
assitant, calling 3 assistants per iteration is very demanding. Furthermore I
am not sure whether is appropriate to leave "DAQ Assitant 2"
unwired because LabView cannot guarantee the execution order of that task.
Could you upload your VI? I would, like to execute it on my
own machine.
Just a question, are DAQ Assistant 2 and axis 2 target pointing to the same
resource?
I would also try to perform the task without the assistant using the DAQmx
tools (You will find them in the Functions Palette>>Measurement
I/O>>NI DAQmx). For example on the usage of the DAQmx API (tools) refer
to LV examples (LabView Help>>Find Examples and open in the file broswer
Hardware Input & Output>>DAQmx).
Hope you found it helpful.
Just let me know about your progress. In the following posts you can write in
Spanish if you feel more confident.
06-23-2008 09:17 AM
06-23-2008 11:18 AM
Hola Eduardo,
Estoy estudiando tus VIs para ver si conseguimos optimizarlos. De todas formas
las "herramientas" de DAQmx de más bajo nivel son la mejor forma que
conozco para conseguir sincronizaciones auténticas. Si la temporización es un
aspecto crítico de la aplicación definitivamente deberías prescindir del
asistente.
Te paso un enlace con un tutorial sobre sincronización de tareas con DAQmx.
Cómo verás (Figure 2 de Timing and Synchronization features) primero se
crean las dos tareas, luego se configura el reloj y se puede elegir una fuente
cableando una constante o un control a la entrada "source" (que en tu
caso podría ser el canal PFI0 o el reloj interno de la tarjeta de adquisición).
La mayor sincronización se consigue mediante un trigger que dispara el inicio
de la adquisición de la tarea más crítica (Figure 7 de Timing and
Synchronization features). Si vas a empezar a utilizar el API de
DAQmx sin asistentes te recomiendo que trabajes sobre el tutorial Timing and
Synchronization features...:
http://zone.ni.com/devzone/cda/tut/p/id/4322
También deberías incluir todas las tareas de adquisición que vayas a
sincronizar en un mismo bucle. Y sobre todo, sobretodo cíñete al máximo
al esquema de flujo de datos. Con lo de flujo de datos me refiero a que no debe
haber ningún bloque que no éste conectado a uno precedente para asegurar que se
ejecuta en el momento preciso (En última instancia siempre se pueden conectar
entre sí los terminales "error out" y "error in"). Una vez
reescrito el código no se deberían dar más errores de overwrite para las rates
que me comentas.
Sé que es mucha información de golpe. En cualquier caso espero los comentarios de tu evolución.
Recibe un cordial saludo.
06-23-2008 12:08 PM