LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format into String - Too many format specifiers

Solved!
Go to solution

Hello,

 

I am developing a Labview application, which writes some measurements into an EDF-File. EDF means European Data Format. An EDF-File has two parts. An Header Part and a Data Part.

I found on this website "https://teuniz.net/edf_labview/index.html" a free and small collection of VI´s for EDF. I attached the small collection of VI´s to this post. These are a great starting point for developing my application.

 

I am using the "EDF-header.vi" from the "EDFrecorder Labview 2011" folder. My problem is that when I am running the unmodified EDF-header.vi I receive the following error message: 

Michael_1122_0-1631698630806.png

This error message occurs in the sequence 1 of the stacked sequence structure in this VI.

 

Can you please help me, why this error message occurs?

Thank you very much in advance.

 

Best regards,

Michael

 

 

 

 

 

 

0 Kudos
Message 1 of 10
(2,370 Views)

Format specifiers in all cases are ok. Are you sure you did not modify the code accidentally?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 10
(2,358 Views)
Solution
Accepted by topic author Michael_1122

Your problem is in some hidden code in Frame 1. If you expand that frame to the right you will find that there's some code there that ultimately does nothing. Delete that code and it should work fine.

0 Kudos
Message 3 of 10
(2,317 Views)

@johntrich1971  ha scritto:

Your problem is in some hidden code in Frame 1. If you expand that frame to the right you will find that there's some code there that ultimately does nothing. Delete that code and it should work fine.


Good catch! It's a really ugly and Rube-Goldberg-ish code!

However, this hidden code does not produce any error with LV2017. Probably the compiler optimizer sweeps it away.

Furthermore, it seems the error should be another, since there is no format string connected here.

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 10
(2,310 Views)

I removed the hidden code and the error stopped happening. LV2020 SP1 32b.

 

Edit: weirdly enough, the given code ran with default values does produce an error in that version but not in 2017. Not saying I didn't believe you when you said it before, but yeah. 

 

So what values are you giving it in 2017 that are producing an error? How can we replicate in 2017?

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 5 of 10
(2,298 Views)
Solution
Accepted by topic author Michael_1122

@pincpanter wrote:

@johntrich1971  ha scritto:

Your problem is in some hidden code in Frame 1. If you expand that frame to the right you will find that there's some code there that ultimately does nothing. Delete that code and it should work fine.


Good catch! It's a really ugly and Rube-Goldberg-ish code!

However, this hidden code does not produce any error with LV2017. Probably the compiler optimizer sweeps it away.

Furthermore, it seems the error should be another, since there is no format string connected here.

 


Yes, it was surprising that this was the error - I found it by running in highlight execution mode in LV2019. I didn't understand why it gave that error and didn't really investigate further once I found that removing it removed the error. 

 

I fully agree with the Rube-Goldberg aspect of the code. Given some time (that I don't have right now) I think that I could get that code down to a few postage stamps in size without the stacked sequence (I can see immediately that at least 8 of them could be easily combined - they have FOR loops indexed off of the same input).

0 Kudos
Message 6 of 10
(2,289 Views)

@FireFist-Redhawk wrote:

I removed the hidden code and the error stopped happening. LV2020 SP1 32b.

 

Edit: weirdly enough, the given code ran with default values does produce an error in that version but not in 2017. Not saying I didn't believe you when you said it before, but yeah. 

 

So what values are you giving it in 2017 that are producing an error? How can we replicate in 2017?


Based on the first response I think that pincpanter was unable to replicate the error. It appears that something changed between 2017 and 2019 versions that caused this to throw this error.

0 Kudos
Message 7 of 10
(2,282 Views)

Whoops, I read pincpanter's last response as if it was from the OP 😅

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 8 of 10
(2,276 Views)

Hello Paolo,

hello johntrich1971,

hello Redhawk,

 

thank you all very much for your support. As you mentioned there is in fact some hidden code in frame 1. I am working with Labview 2019, this is possibly the reason why I was the only one who got that error.

 

After removing the useless code part in frame 1, it works fine.

 

Best regards,

Michael

0 Kudos
Message 9 of 10
(2,242 Views)

It was useful in that it highlighted some really poor LabVIEW coding habits.  😄

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 10
(2,184 Views)