LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

urgent help needed:saving serial port data in multiple txt file

Solved!
Go to solution

@lm35 wrote:

now for the code should i use  a peoperty node inside the for loop or while loop, or any other ways to store the adc vaues in txt file, any code correction or code would be helpful.


No, you should not be using the Bytes At Port property node.  You need to follow the protocol that the micro-controller is using to send the data.  Otherwise you will get bad values.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 18
(1,001 Views)

Thanks dude.

what should i do with the for loop(for visa read) should i remove or replace it with a while loop with delay inside or simply put in a case structure something like that.

0 Kudos
Message 12 of 18
(995 Views)
Solution
Accepted by topic author lm35

Hi "dude",

 

please keep "technical" questions in the public forum…

 

Try this:

check.png

You really need to define/explain the formatting of the strings/data you receive from your device!

 

(And please stop calling everyone "dude". We all use nicknames, some of us also write their first name.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 18
(980 Views)

@lm35 wrote:

what should i do with the for loop(for visa read) should i remove or replace it with a while loop with delay inside or simply put in a case structure something like that.


Again, WHAT IS THE PROTOCOL OF THE MESSAGE DATA?  We cannot give any real help without that information.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 18
(968 Views)

Dear Mr GerdW,

Thanks for the help, the code is working now.

0 Kudos
Message 15 of 18
(923 Views)

Dear Mr GerdW, In this code i am having some timing problem, after running some time i am getting corrupt data means the flow of data is not constant and after i have created around 10000 files the flor loop counter is not running to 304 instead it running to some ranndom no.plz help i am attaching mz code

Download All
0 Kudos
Message 16 of 18
(895 Views)

format of data

0 Kudos
Message 17 of 18
(894 Views)
0 Kudos
Message 18 of 18
(892 Views)