LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read sample rate from a .txt file

Solved!
Go to solution

Hello I am modifying a code so that instead of having the sample rate embedded, I read it from a .txt file.

I will like to see if somebody can tell me how to do this? 

 

I am currently using the  Read (I32) key.vi to do this. Please take a look at the pics for a better understanding

LabVIEW Intermediate I level!
Download All
0 Kudos
Message 1 of 13
(3,827 Views)

Hello.  I think I can help, but I need some more info.  If you just want to add a second rate to the ini file, then you can simply add another key and call it 'samplerate 2' or something like that and read that key value.  Does that help?  If not, then please provide more info and I will be glad to help.

 

John Niezgoski

Signal.X Technologies

0 Kudos
Message 2 of 13
(3,777 Views)
you could use the read from text file.vi
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 13
(3,773 Views)

Hello,

 

 

I am actually reading the sample rate from the text file, I put a probe and it is showing the value I needed to read. The problem is that is not displaying the graph it is supposed to. 

 

I am troubleshooting it right now since the only modification I did was to eliminate the embedded value (250000) and put that in the text file.

 

I also connected everything from the output of the Read Key.VI in order to transmit the 250000.

 

 

 

 

LabVIEW Intermediate I level!
0 Kudos
Message 4 of 13
(3,735 Views)

Hello,

 

If you wouldnt mind posting your VIs, then I would be happy to look at the code for you to see if I can find the issue.  If not, then I would need more info such as what is wrong with graph.

 

John Niezgoski

Signal.X Technologies, LLC

0 Kudos
Message 5 of 13
(3,727 Views)

Hi, It is supposed to graph frequency content vs time, and the display I get comes all black. Look at the attachments for the load state, the first one is the legacy SW and the second one is the modified one.

 

 I put probes on them, and the legacy one gets the 250,000 from the Value embedded. The modified one it is supposed to get it from the sample rate path, please let me know if this is enough info, thanks. 

 

LabVIEW Intermediate I level!
0 Kudos
Message 6 of 13
(3,707 Views)
No one can debug an image. You've been asked to post the actual VI. If you don't want to do that, then explain why or stop asking for help.
0 Kudos
Message 7 of 13
(3,698 Views)

Hello,

 

Without seeing the rest of the code, it seems to me that the sample rate value that you are storing in the shift register in the 'setup' case must be getting written over somewhere else before you get to the 'load binary data' case.  Is the value in the shift register returning 0?  If so, then you  need to check the other cases to make sure they are passing the shift register value through.  I see you have quite a few places where you are using the feature 'use default value if unwired' for your case tunnels.  It can be easy to forget to wire the value on those and then have a zero returned when you dont want it.

0 Kudos
Message 8 of 13
(3,694 Views)
Thanks Dennis.  You are right - debugging an image is pretty tough!
0 Kudos
Message 9 of 13
(3,693 Views)
Here you go John, let me know if you need more info
LabVIEW Intermediate I level!
0 Kudos
Message 10 of 13
(3,661 Views)