05-24-2012 03:39 AM
Why not whatever you give as the output you write to an array and maintain in a shift register then you can have the last value.
05-24-2012 03:50 AM
Yes true I can read the last value from the array I output to the write VI. But my problem is after the Write VI, I am using a Wait until Done VI for continuous generation of the signal. When I press Stop the VI does not stop at the last value from the Array instead stops at any random value. This random value is what i want to know.
05-24-2012 06:08 AM
I assume your AO is latching. You could create another VI to handle this last measurement.
05-24-2012 06:21 AM
Hey
I dont understand what do you mean by latching. Here is my VI. Could you please have a look and tell me what the problem the problem could be
05-24-2012 06:51 AM
By latching I mean the DAC "maintains" the last voltage state written to it.
You want to wire your invoke node, Reinit to Defaults. It's just hanging out in space and potentially could execute before other critical code runs.
You have an uninitiaized shift register in Frame 1 of your stacked seq.
Consider a different design archetecture. Your For loop executes until the task is complete. You might want to look at using a standard state-machine instead of a stacked sequence. This would be much more efficient and sclable than what you have. Stay away from Sequences. Flat sequences have their limited uses, but I see no use for stacked.
As far as measuring the last written voltage, the device should be outputting the last voltage written to it, correct? Is this not the case?
05-24-2012 07:01 AM
Hi
Thanks for the invoke node feature. But in the frame 1 you had mistaken sequence local for a shift register. This sequence local is used in frame 2. The problem i face in my current VI is error 200560 and it says" Wait until done did not indicate the task was done in the timeout".
As far is last written voötage is concerned, yes the AO card retains the voltage last written to it but this voltage is not the last element in the array and therefore I do not know the value of the last written element.
05-24-2012 10:41 AM - edited 05-24-2012 10:41 AM
No, there was no mistake (see below).
05-24-2012 10:44 AM
@suvi90 wrote:
As far is last written voötage is concerned, yes the AO card retains the voltage last written to it but this voltage is not the last element in the array and therefore I do not know the value of the last written element.
I'm not sure I understand what your are needing. You know what the last value written was, and you would like to measure it?