LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continous serial Reading In labVIEW

In the following VI at the last stage i am reading data continuously from the UUT. But while reading serial data continuously in while loop I am loosing few of the bytes.Please suggest me the way i can get all the data from the UUT without loosing.

 

 

 

 

Download All
0 Kudos
Message 1 of 22
(3,240 Views)

Hi Venkata,

 

do you really think it is a good idea to attach a password-protected VI when you want to get help because there is a problem within the block diagram of your VI?

Really???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 22
(3,221 Views)

Sorry sir, i have tried many ways to resolve that issue,In that one method is password protected.

Its password hhh

0 Kudos
Message 3 of 22
(3,217 Views)

Yes i have a problem with my block diagram.

Now i have attached the same by removing password.please have a look into it.

0 Kudos
Message 4 of 22
(3,215 Views)

Hi Venkata,

 

after using my favorite password cracker I have some comments:

I am loosing few of the bytes.

Which bytes exactly do you lose? How many?

-> Set WriteTextFile to NOT convert EOL chars.

 

On the VI itself:

- Why don't you cleanup your VI?

- Why don't you create a smaller VI containing only the stuff needed to get this problem solved? Why do you need so many Disable structures?

- Do you really need to open so many COM ports in parallel? Do you really need to call VISAConfigureSerialPort even without providing a COM port?

- Do you really need to use BytesAtPort?

- Do you think it's a good idea to build path using string functions instead of path constants and functions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 22
(3,214 Views)

I have attached the Vi below without any password.

Download All
0 Kudos
Message 6 of 22
(3,212 Views)

Ok Sir I will remove disable structures i will send you modified VI.And i need to open one COM port first with one baud rate.With that baud rate i will send commands to the UUT.Later i will close that COM port.After that i will open the same COM port with different baud rate.With this new baud rate i have to read data from the UUT continuously from the same COM port.I want to log the data in the bin file.

0 Kudos
Message 7 of 22
(3,205 Views)

Hi Venkata,

 

I want to log the data in the bin file.

Then you should use "binary" functions instead of "text" functions.

Don't forget to read the help for WriteBinaryFile regarding the "string size prepend" input…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 22
(3,198 Views)

Sure That part i will modify please have a look on this cleaned VI.

0 Kudos
Message 9 of 22
(3,194 Views)

Hi Venkata,

 

have a look on this cleaned VI.

  1. There are still 5 instances of VISAConfigureSerialPort with missing COM port input. THose 5 instances are useless and senseless…
  2. You still didn't change that "Convert EOL" option of WriteTextFile…
  3. You still build paths using string functions instead of path functions.

Btw. NEVER hide labels of controls/indicators in the block diagram…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 22
(3,189 Views)