07-18-2010 03:40 AM
Hi,
In my project i am required to constanly acquire analog input from 2 sensors and den generate the desired output to 2 devices using use-cases(already done).
The question now is if it's possible to override the DAQmx Write so that i can ignore the use-cases and just generate the output i want
Solved! Go to Solution.
07-18-2010 06:21 PM
07-18-2010 07:47 PM
Hi,
Attachdc is the use case i am using i'm trying to override the output and ignore the acquired analog input which go into the use case.
07-18-2010 09:56 PM
Put a case statement around the case statement you already have? Is the point to skip the DAQmx write or have a control to set the output?
And clean up your diagram. The wiring is horrible.
07-19-2010 01:11 PM
Dennis is right about your wiring. You should not wire from right to left like you did from your case output to the DBL converter, and from the DBL converter to the Write. You output of case structures and loops should be on the right side. Inputs on the left, outputs on the right. It is OK to occasionally have inputs/outputs on the top and bottom, You should not hide wires under other objects, like your error wire being behind the case. You don't need to make your case structure so huge, shrink it down to make your wiring easier. Don't make unnecessary wire bends. Straighten some of them out.
Also, use shift registers for the error and task wires when using a loop. This will propogate the information from one loop iteration to the next. If there is an error in one loop iteration, it gets lost on the next iteration because the error in on the left side input is "no error". A shift register will force the error out from one iteration to be the error in on the next iteration.
Put a small Wait(ms) delay in all loops to prevent hogging of the CPU. Look at my modification to your vi.
07-19-2010 07:48 PM
Hi
Thanks for the reply and advice i have sorted the wiring and added another case structure to acheive what i wanted.
07-20-2010 10:00 AM
@bloodxrage wrote:
Hi
Thanks for the reply and advice i have sorted the wiring and added another case structure to acheive what i wanted.
Please mark the Accepted Solution so that others who browse here can easily see the solution. In this case, it would be Dennis's post about adding another case structure. And give him a kudo while you are at it.