08-03-2009 07:09 AM
08-03-2009 09:32 AM
Could you provide some typical values for Stroke and Encoder? These and no cycles should be integers, by the way. You might also try changing to Finite Samples.
A weirdness separate from your issue is the conversion of the 2D waveform array to a 3D array. I don't see the point of this at all.
08-03-2009 10:06 AM
I have the stroke set to 4 and the encoder as 720. in the block diagram this allows the read block to read 1440 samples for a 4 stroke engine and 720 for a 2 stroke engine.
The arrays converting from a 3D to a 2D allows the autoindexing output of the for loop to be converted back to a 2D array so i can save it and display it. If there is a better way of doing this please let me know. I thought i had to use the build array block to build an array from the data coming out of the for loop, but my main concern is just getting the reading of the data working first.
08-03-2009 11:06 AM
I don't have the trigger source and when I run the VI without one, I don't have any problems. Have you looked at the trigger with a scope?
As far as the array of waveforms, if you select the DAQmx Write to be a single channel, then what you get out of the for loop is a 2D array and that can be wired directly to the graph and file write.
08-03-2009 03:49 PM
yeah i managed to look at the trigger signal as well it seems to be fine. Im wondering if the problem is coming from when the engine is running at a set speed it actually is never at a constant speed but fluctuates around a speed. when this happens the timing of the external trigger and timing will be altering with it so if when you initially run the program , maybe lab view calculates how long it will take to do the Analogue to digital conversions from the frequency of the timer but when it changes speed during operation maybe that introduces this problem where it trys to sample while it is already sampling.
I am now also getting the same problem when using the signal generators not just the engine so am really confused what could be making it go wrong.
I even just scrapped trying to use the vi and just when to the measurement and instrumentation part of the program to test the PCI bored , i created a task in this for acquisition of a analogue voltage signal. so looks like the screen from the DAQmx assistant. Even in this it errors with the problem ADC conversion attempted before the prior conversion was completed.