取消
显示结果 
搜索替代 
您的意思是: 

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

SEE THE LINK :
 
 
ANY HELP WILL BE WELCOM.
0 项奖励
1 条消息(共 14 条)
4,624 次查看
Hi!

  I've tried to answer in LabWindows forum.

graziano
0 项奖励
2 条消息(共 14 条)
4,615 次查看
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 项奖励
3 条消息(共 14 条)
4,597 次查看
If you have LV 8 then there is a vi called printable? in the comparison pallette.



Joe.
"NOTHING IS EVER EASY"
0 项奖励
4 条消息(共 14 条)
4,588 次查看

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

-D

0 项奖励
5 条消息(共 14 条)
4,582 次查看

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

regard's

eyal

0 项奖励
6 条消息(共 14 条)
4,559 次查看
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 项奖励
7 条消息(共 14 条)
4,549 次查看

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 项奖励
8 条消息(共 14 条)
4,528 次查看
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 项奖励
9 条消息(共 14 条)
4,523 次查看
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
10 条消息(共 14 条)
4,518 次查看