From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading from CO2 sensor connected to the PC

Solved!
Go to solution

Hi Raven!

 

Ah thanks buddy! Putting a space infront of my Z fixed the error!

 

Actually I would just like to do what is most reasonable. What do you suggest doing instead? 🙂

Did I not use the Scan From String on the data that came out of the VISA read? 

 

Greetings 

DP

0 Kudos
Message 21 of 63
(1,271 Views)

No.  You used scan from string on the string where you keep concatenating all of the new VISA read data at the end.

 

I think adding the space in your search string (if that is where you are talking about adding a space) is a mistake.  The other lines that were the newer data you should've been analyzing did not seem to have that space.

 

You need to figure out why that space was there.  Perhaps it was other problems in your code.  If it is there sometimes and not others, consider using a "Trim Whitespace" function to clean it up before you feed it through the Scan from String.

0 Kudos
Message 22 of 63
(1,246 Views)

Hi Raven

 

Sorry I haven't responded before. 

 

Could you take a look at this VI and tell me how to improve it. Please do not rip your eyes out because I know it probably looks horrible.I know that using write to measurement file is wrong and there probably is alot of ways to do it better but this way I have been able to get the VI to do what I want.

I added the VISA serial write and read at the bottom of the VI and everytime it starts reading everything else in the VI just slows down extremely. What is the cause of this? 

 

Greetings 

DP

0 Kudos
Message 23 of 63
(1,214 Views)

Hi DP,

 

which VI?

(When you attach your VI could you please provide it with LV2014 or older?)

 

Edit: You attached the VI while I was writing this message…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 24 of 63
(1,211 Views)

Hi Gerd

 

Whenever I try to save as a previous version I just get a folder with the same exact version? I have been trying several times....

 

Greetings 

DP

0 Kudos
Message 25 of 63
(1,205 Views)

Can you open this one? 

 

Greetings 

DP

0 Kudos
Message 26 of 63
(1,198 Views)
Solution
Accepted by topic author DP123

Hi DP,

 

I added the VISA serial write and read at the bottom of the VI and everytime it starts reading everything else in the VI just slows down extremely. What is the cause of this?

It gets slow because you programmed it this way! THINK DATAFLOW!

 

Put the serial communication into a parallel independent loop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 27 of 63
(1,190 Views)

Hi Gerd

 

Thanks that worked :)! 

I will try keep working on my original problem which was to get the chart to work properly and write the data to a file. It was also mentioned if I wanted to build up one long string of all the responses by Raven. Was he thinking that I should remove the shift register?

 

Greetings 

DP

0 Kudos
Message 28 of 63
(1,184 Views)

Hi everyone

 

I can not make the chart work. I keep getting an error no matter what I try. Any suggestions? 

 

Greetings 

DP

0 Kudos
Message 29 of 63
(1,142 Views)

Hi DP,

 

I can not make the chart work.

Which chart?

 

I keep getting an error no matter what I try.

What kind of error do you get? Error numbers? Error messages? BSOD?

 

Any suggestions?

Attach your current state of the VI. Explain where exactly you have problems with!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 30 of 63
(1,140 Views)