Reading a streamed channel


Recommended Posts

Hi

Could you tell me how to read a streamed channel with timing of 0.0? I use the channel for a sequence to find Bottom dead center. I don’t want to read it while streaming because I don’t want the data to add to channel history. I’m plotting the streamed data and afterwards I need to read this channel to return to Bottom. 

Thanks

Link to comment
Share on other sites

Hello

Disregard my last question. I went back and reread the chapter and got it working. 

The only thing wrong now is the sequence won’t end on it’s own. Am I missing something? Shouldn’t it end itself when completed?

Thanks

Link to comment
Share on other sites

Hi

Thanks for responding. I had a while(1), read(channel) with a if() followed by another while(). Once I removed the first while() everything worked. 

Now I need some help on counting. I saw the post on counteroffset. I’d like to read 125 counts but I’m having trouble figuring it out. Do I  put something in the RawCounts channel event? Or do some type of sequence?

Link to comment
Share on other sites

Starting and stopping the stream like that is impossible because DAQFactory only sees the data in blocks.  You can log that data, however, using an export set.  Just clear the history of the channel before starting the stream (myChannel.clearHistory()), then start the stream.  Once you stop the stream you can log the first 125 values using the expression:

myChannel[numrows(myChannel)-126, numrows(myChannel)-1]

in the export set.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.