From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write "Pagedown" to the serial port?

Solved!
Go to solution

Hi all

 

In my application i am communicating with the board through RS232. For selection and some other purpose we have to use the "PageDown" key. Manually we will do this in Teraterm by selecting the "PageDown" key in keyboard. I am trying to automate the whole test procedure. How can i write the "PageDown" to serial port? From event structure i got 81 as the scancode for "PageDown", i tried with this code and it failed. How can we write the extended ascii code??

 

please help me..

 

Thank You

 

Regards

Rajesh R.

Rajesh Raghavan Nair

Certified LabVIEW Architect
Certified Teststand Architect
0 Kudos
Message 1 of 7
(3,105 Views)

It is more easy think about strings as a  byte array with values from 0-255. In Labview you will find several modes to display/use non printable ASCII codes. Go to the help (the F1 key) search for strings and locate the "display types" section.

It is not any ASCII code for the pgdown key. But teraterm must send a ASCII code or a sequence of ASCII codes. Just hook Labview up with Teraterm and see what Teraterm send then you push the Pgdown key. Then mimic this in Labview.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 7
(3,095 Views)

page down = FormFeed?

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 7
(3,090 Views)

Hi Rajesh,

 

To send Page Down to serial port use 0161 in hex format in string.

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 4 of 7
(3,074 Views)

@Himanshu Goyal wrote:

Hi Rajesh,

 

To send Page Down to serial port use 0161 in hex format in string.

 

Thanks and Regards

Himanshu Goyal


I have wasted a lot of time debugging code. Because the string indicator/control or constant was set to wrong view mode. I know Doh!...Never think you have the correct display mode check it to be sure



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 5 of 7
(3,063 Views)

If your device uses an ANSI/VT100 terminal type, you may need to send an escape code to perform certain functions.

 

http://en.wikipedia.org/wiki/ANSI_escape_code

 

Your hex string might look something like

 

335B 3236 54

 

This would be the escape key, a right bracket, the digits 2 and 6 to scroll down 26 lines and T to indicate scroll n lines (26).

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 6 of 7
(3,053 Views)
Solution
Accepted by topic author Rajesh_Nair

Hi all

 

Thanks for the reply. Inorder to findout the corresponding Hexcode for "Pagedown" key, i did the following :

1.Connected the serial port of the PC with LabVIEW to another PC with Teraterm

2. Gave an input to Teraterm by pressing the "Pagedown" key

3. Observed the Hexcode through Serial Read in LabVIEW

 

The value was found to be 1B5B 367E and now it is working!

 

Once again Thanks to all of you for your valuable response.......Smiley Happy

 

Regards

Rajesh R. Nair

Rajesh Raghavan Nair

Certified LabVIEW Architect
Certified Teststand Architect
0 Kudos
Message 7 of 7
(3,033 Views)