LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sudden stop of File writing

Solved!
Go to solution

Msg #6, 2nd screencap:  notice the use of Bytes at Port!  

 

To the OP: search here for "Bytes at Port" and you'll get an eyeful of strongly worded cautions NOT to use it in the exact way you're using it.  A common outcome of that usage is (wait for it) -- incomplete messages.  

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?

(Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).



Message 11 of 27
(248 Views)

@Kevin_Price wrote:

Msg #6, 2nd screencap:  notice the use of Bytes at Port!  

 

To the OP: search here for "Bytes at Port" and you'll get an eyeful of strongly worded cautions NOT to use it in the exact way you're using it.  A common outcome of that usage is (wait for it) -- incomplete messages.  


I agree, but one exception that is often mentioned is to check if there are any bytes at port.

 

I'd avoid Bytes At Port so drivers stay compatible with TCP\IP resources, when switching to a TCP\IP to Serial converter.

0 Kudos
Message 12 of 27
(243 Views)

I'd also check to see if there's anything that could genrate an error on any of the En-Q functions.
If the comms is broken due to bytes at port or another reason, then does it even En-Q - so do you actually have data being passed around the program?

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 13 of 27
(219 Views)
Solution
Accepted by topic author WWolf78

Hi together,

 

thanks for the support,

honestly I've to admit an very embarrassing reason for that "error"

 

I was looking at the Logfiles (.txt) files via the Windows explorer:

if you scroll down to the lowest position, it looks like the file is incomplete:

 

WWolf78_0-1643106201620.png

 

 

if you take a look into the file itself, its complete

 

WWolf78_1-1643106293116.png

 

so finally just a stupid explorer display issue

 

sorry for that confusion!

 

0 Kudos
Message 14 of 27
(208 Views)

I can really recommend Notepad++, although there are more applications like it.

Message 15 of 27
(202 Views)

wiebe@CARYA wrote:

I can really recommend Notepad++, although there are more applications like it.


+1 for (it tells you if a file you've go open has been updated externally and asks if you want to reload)

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 16 of 27
(199 Views)

wiebe@CARYA wrote:

I can really recommend Notepad++, although there are more applications like it.


I am personally a fan of UltraEdit, which also has the ability to reload an opened file.  Its binary editor and comparitor have also saved me on more than one occasion.  But the price of Notepad++ is really hard to beat (free).


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 17 of 27
(195 Views)

LabVIEW Ninja skills!

 

I am going to come back and recommend an additional performance enhancement.   Since you open the file once and write many times, enable file Buffering!  There is an optional boolean for that into Open Create Replace File.vi that few people bother to read the help file about.


"Should be" isn't "Is" -Jay
Message 18 of 27
(178 Views)

Hi Jay,

 


@JÞB wrote:

Since you open the file once and write many times, enable file Buffering!  There is an optional boolean for that into Open Create Replace File.vi that few people bother to read the help file about.


Thanks for this reminder…

 

But (atleast in LV2016) that buffering is enabled by default.So there will be no improvement by wiring a FALSE constant to a default FALSE input…

(You can disable buffering when needed.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO
0 Kudos
Message 19 of 27
(173 Views)

To the OP:  solved for the moment, but I still think you're very likely setting yourself up for trouble with your specific use of Bytes at Port.  It appears that you then Read that same # of bytes and pass it along for decoding, *seemingly* with the assumption that you've read a complete message, not just part of one.

 

Using Bytes at Port this way is prone to giving you partial messages that decode incorrectly.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?

(Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).



Message 20 of 27
(159 Views)