LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA stable or new sampling frequency

Solved!
Go to solution

@cbutcher wrote:

I added a Re/Im to Complex node, and changed the representation of your shift register value, then replaced the waveform chart with an XY graph.


Mind if I ask why you use a Complex data type for this instead of, say, two arrays, or an array of cluster of points, etc? Just curious as I've never done XY plotting that way, though of course it makes sense.

0 Kudos
Message 11 of 14
(499 Views)

@Kevin_Price wrote:

One small recommendation if you use the approach in cbutcher's snippet and timestamp your *receipt* of the message:

 

Use some sequencing method (this is one decent place for a single frame sequence structure) to make sure you query your timestamp immediately *after* returning from the VISA Read.  That'll do a better job of capturing the receipt time.  But realize that his caveat still holds true -- timestamping the receipt is still less true than timestamping at the source.


Good point! I'll keep that in mind in future.

 


@Kevin_Price wrote:

(I was gonna modify in place, but although the snippet was labelled 2015, my attempts to drag it into 2016 failed, identifying it as a 2019 snippet?)


I've heard that happen before... maybe I'll have to set to just write 2019 if the backsaving in CCT isn't working, that way at least it isn't falsely advertised as available for 201[\d^9].

 

Bert, re. the complex data type:

a) Christian Altenbach said so... 😉

b) Perhaps easier to append (I was about to post a demonstration, then I downloaded my snippet and realised it is a demonstration. So I'll post the opposite...

Comparison of bundling optionsComparison of bundling options

Note I included Kevin's modification regarding the timestamp here too.

 

OP: You might also take a look at the Data Queue PtByPt VI or in this case (complex values) the Complex Queue PtByPt VI. Of course you don't have to, but it can make circular buffers a little less work.

 


GCentral
Message 12 of 14
(484 Views)

If you have any other solution I would be grateful because I do not know why but this approach causes a blue screen and shuts down my PC. Is there any way how to calculate the sample rate in this case? It is because I do not know where that weird sample rate came from (94 S/s).

0 Kudos
Message 13 of 14
(447 Views)

All very confusing... 

I'd suggest the following :

  • Add an indicator to the i node. Check how quickly it changes.
  • For sampling, you could use a feedback node or shift register and check dt values. Frequency is 1/period. You could get a time varying mean value with another circular buffer. 
  • Where did you get 94S/s?
  • Can you check memory usage (perhaps just quickly with e.g. task manager) while you run the code? 
  • How quickly does your pc crash? 

Nothing in the snippets posted should cause that kind of behaviour... 


GCentral
0 Kudos
Message 14 of 14
(440 Views)