LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to display unprintable ascii char --->HELP NEEDED HERE.

SEE THE LINK :
 
 
ANY HELP WILL BE WELCOM.
0 Kudos
Message 1 of 14
(4,625 Views)
Hi!

  I've tried to answer in LabWindows forum.

graziano
0 Kudos
Message 2 of 14
(4,616 Views)
One fail-safe way to do it is to convert your string into a byte-array. That outputs an array of unsigned 1-byte numbers, each number corresponding to the ascii character of the string character. Then use Search 1D Array for the number 7. That will output an index for the match that you can use with String Subset to extract everything before that character as follows:

Message Edited by Jarrod S. on 05-12-2006 10:29 AM

Jarrod S.
National Instruments
0 Kudos
Message 3 of 14
(4,598 Views)
If you have LV 8 then there is a vi called printable? in the comparison pallette.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 14
(4,589 Views)

Actually, the Printable? function has been around since LabVIEW 3.0.1 at least.  😉

-D

0 Kudos
Message 5 of 14
(4,583 Views)

hi Jarrod
i try what u sugested but it's still dosent work.

regard's

eyal

0 Kudos
Message 6 of 14
(4,560 Views)
Hi,

Can you please post a small example that shows how this method or other suggested methods don't work for you? There have been many perfectly good suggestions to solve this problem, unless we are all misunderstanding your needs. Honestly, there's nothing not to work about the example I posted. It searches for specific ASCII values by their numbers. At that point it doesn't matter whatsoever if they're displayable or not.

Jarrod S.
National Instruments
0 Kudos
Message 7 of 14
(4,550 Views)

Hi jarrod,

first your example is good and i don't think that the problem is in your vi!!!.

let me explain what i'm doing :

i'm gething string from a bar-code(connected via keyboard ps2), the bar code is program that at end of the string i'm puting a ctrl-g(^G) and enter.
 
CTRL-G in ascii table is 07.
 

i know that in dos (run->cmd) i can see in the end of the string the ^G and then enter , so the barcode is working good.

try to press[ctrl+g]  in dos mode the computer will beep after the enter,but in labview it's[i think] asurtcut and when i try to insert the barcode

it's doing something(change the working mode from edit mode to run mode) maybe we need to disable the surtcut menu and then try it.?

do you know how to disable this surtcut?(it's not in the vi propertis, i try it ...not working).

regards

eyal.

0 Kudos
Message 8 of 14
(4,529 Views)
aah, it is a PS/2 keyboard plug-in you could use the event of the key down?
The attachment show a 'key down?' filter event, check if it is a capital 'G' or a small 'g'. I don't know if there is a difference in your case and then check if the ctrl key was used. If this happens the while loop is stopped.

I don't think CTRL-G is ascii 07. Ascii 07 is BELL. Maybe in some languages ctrl-g is saved as 0x07. but a lot of none displayable characters have no keyboard assignment.
Ton
PS This screenshot was made with Starware

Message Edited by TonP on 05-16-2006 07:59 AM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 9 of 14
(4,524 Views)
Hi TonP!

  In my ASCII table, the first 32 characters, from 0 to 31, are given a Key value, and ASCII 0x07 character, that correspond to BELL signal (teletypewriter legacy, or stuffslike that...), has <ctrl G> as Key. 

   More exactly, 0x00 is <ctrl @>, then from oxo1 to ox26 is <ctrl LETTER>, and so on.

   To try this, just open DOS prompt window, press <ctrl> + <G>, and >Enter>, you'll hear the bell!

  I guess that's a way for printing chars that are not in the keyboard....

graziano
Message 10 of 14
(4,519 Views)