LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt user for invalid data

Sure Altenbach,

 

Valid serial number: 1234ADCF

But user has the option to assign the serial number as per the HW connected.

And, serial number should not be more than 32 bit length after converting to hex, so user can not enter more than 32 bit character.

 

Pls let me know if that helps to understand.

 

Regards

Aniket

0 Kudos
Message 11 of 42
(1,472 Views)

So the serial number is a hex formatted U32 value.

 

Again, use a U32 control and set the format to hexadecimal (%08x) and invalid values cannot be entered. No need for any code. You can always format it as hexadecimal string if needed elsewhere inside the code.

0 Kudos
Message 12 of 42
(1,465 Views)

But also wanted to prompt users about the out of range data entered.

And, it should be string input (with Normal display) with limit in length.

 

 

Regards

Aniket

0 Kudos
Message 13 of 42
(1,460 Views)

@aniketjha wrote:

But also wanted to prompt users about the out of range data entered.


As I said, this cannot happen if you use my advice. No code needed.

0 Kudos
Message 14 of 42
(1,456 Views)

Altenbach,

 

What if the input is string(Normal display), then how to proceed further and length 32 character maximum.?

 

 

 

0 Kudos
Message 15 of 42
(1,450 Views)


@aniketjha wrote:

Altenbach,

 

What if the input is string(Normal display), then how to proceed further and length 32 character maximum.?


Simply don't do it that way if a much better solution exists.

 

You need to be consistent. You randomly mix 32 bits, 32 characters, 8 characters, etc. These are all very different definitions!

0 Kudos
Message 16 of 42
(1,448 Views)

@aniketjha wrote:

Altenbach,

 

What if the input is string(Normal display), then how to proceed further and length 32 character maximum.?

 

 

 


Why even have it as a string?  Just make the input a numeric 32 bit number displayed as hex.

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 17 of 42
(1,444 Views)

@billko wrote:

en have it as a string?  Just make the input a numeric 32 bit number displayed as hex.

exactly! 😄

0 Kudos
Message 18 of 42
(1,437 Views)

@altenbach wrote:

@billko wrote:

en have it as a string?  Just make the input a numeric 32 bit number displayed as hex.

exactly! 😄


I wasn't trying to steal your thunder - I was emphasizing your lightning.  😉

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 19 of 42
(1,434 Views)

Is this is to capture a Model number of an instrument like AFG3102 (A dual channel Arbitrary / Function Generator from Tektronix) or a Serial Number of C022080?  Not all Serial numbers (MY41047333) nor Model Numbers (AFG3102) are valid in their hexadecimal representation.  The Model number that I have listed has a non-Hexadecimal character 'G'.  How would that be handled?  Could you give us a few valid entries and a few invalid entries to help clarify things further?

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 20 of 42
(1,430 Views)