Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Sending ASCII In HEX RS-485 Commands


Hi,

I need to send commands from Host to Instrumnets and back
ASCII in HEX format (RS-485).
I know what the commands are but I don't know how to write it in the
VB code.

Commands exapmles:

Typical WRITE command (Host write to Instrument):

<stx> L <addr> <----------Data--------------> <cksm> <etx>
02 4C 33 32 30 32 30 30 30 30 31 35 46 46 37 39 03

Insrument reply:

<stx> L <addr> <-Data-> <cksm> <ack>
02 4C 33 32 30 30 31 31 06

**If someone can show me how to implement this protocol in VB code
I'll be more then glad.

Thanks, Tzachi




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Use The Ascii Key Commands
i just can't figure out...exactly what should i write if i want imgBall to move 500 twips left when i press "d" ? (ascii= 68)

help!

Sending SMS Via The Use Of AT Commands
hi i'm new here does anyone know the source code for sending reminder for medical appointments through sms (modem) to the selected person & time (choose frm database)
i need it for my project urgently thanks

Sending Commands
Does anyone know how I can send commands between 2 separate VB apps that I have written whilst they are both running.
Each app knows the handle of the other, but from here I’m not sure where to go.

Thanx
N…

Sending Commands To WMP
How can I send commands to windows media player to tell it to go to the next song or toggle play/pause without creating an activex control in a form. Also, is there anyway to get the song name, album, and artist of the currently playing song (for songs played from thru the radio feature)

Sending Commands
what i would like to do is have my prog send a command to another program, such as notepad. How would i have a command such as SendKeys "bcdefg" be sent to notepad when the letter 'a' is typed in notepad?

Sending Commands
hi all i've been searching around the forums and found mixed answers to the topic of sending commands to a cmd.exe(command prompt) open window. is it possable? if so can someone show me how its done ? thanks for the help

Sending Esc Commands
How do I send the Esc Command to a Pole Display (Dynapos VFD) that is connected to the serial port?
The Esc Command are sending by Dynapos
I need to send a String
Thanks

Sending Commands To Xp
hey alll, can i send a command, such as the Windows key (between ctrl and alt) do that, for example the start menu is activated. Hope u understand wot im riving at...
ta

Help Please! Sending Commands
Hi
i working on this camera program to change settings
i use HPortal.dll control to do this

it uses a function to send this long value to the camera
VideoPortal1.SetCameraPropertyLong(lProperty as long,lPropertyValue as long)

the problem is i dont know what value to send, i had this module which had all these conts used for setting properties values etc but it was out of date and missing stuff
i want to rotate my camera around using custom controls does anyone know how to find out what values you need to send to do this

Sending ESC Commands To Printer
Hi all,

I am trying to send Special ESC Commands to my printer with standard VB printer object.

If I connect my printer to LPT1 port and use smtg like below, it is working.


Code:
Open "lpt1" For Output As #1
Print #1, Chr$(27); Chr$(52);
Print #1, "This one is working just fine"

Close #1

But the thing is I am using a parallel bluetooth port for my printer. This printer is shared in network.

How can I use VB Printer object for sending ESC characters like I did in above examples?

Any Ideas?

Sending Commands To VFW Dialogue
Hello,

I am writing small program to collect images from a webam in VB using a VB wrapper for the VFW interface.

What I would like to do is to get my program to directly modify settings of the camera. I can use the show source dialogue method to display the window with the settings in but need a way of changing them.

I could work out the sequence of key presses that could be entered into the window to achieve this.

Can someone please point me in the right direction of a windows function that will send key presses to another window. Also the VB code stops execution when the show source dialogue is shown. How do I keep VB running to send commands to the dialogue window.

I am quite prepared to do some reading but need to know what to read!!!

Thanks

Steve

Sending Commands To A Game.
Is there a way to use SendKeys or anything like it to send commands to a console of a game, I mean send it directly into the game console, I have tried SendKeys, but that only makes it so you have to have the console open. I am trying to send it into a Quake3(MOHAA to be exact) type console if that matters any.

Sending Commands To Programs
I was just wonering if anyone knew how to send commands to programs eg:

- changing msn messenger status to away, sending message to people in msn

-changing yahoo messenger status, things like that

any help is greatly appreciated!

Sending AT-commands To ComPort
Mjello Anyone...

It is probably possible to send custom commands to a ComPort i.e. Com 1 but how??

The reason I'm asking is because i would like to code a program for my Siemens C35i... I have finally received the codes form Siemens, but I don't have a clue how to send them to the telephone...
The telephone is connected to the computer via a cable connected to the Com port!!!!

Thanks in advance

MC_Claus...

Sending SMS Messages Using AT Commands Help!
Hi

I know there is a lot of code out there for sms messaging using email, html, winsock etc. But I am simply wanting to send SMS using a GSM modem, doing so by writing data/AT commands directly into a COM serial port.
I know I have to start by entering the SMS center number and phone number one wants to dial using something like

MScomm1.output="AT+CSCA="&chr$(34)&"+351987987987"&chr$(34)&chr$(10)

MScomm1.output="AT+CMGS="&chr$(34)&"987987987987"&chr$(34)&chr$(10)

but how do I enter the message to send afterwards. In a terminal program the correspondent line above results

“> “ and one enters the message text and press control +Z, and message is gone…

But writing to the com port how do I enter the text
Simply
Mscomm1.output=" teste 123" does not do anything.

I am not sure where and how to put the control+z? I must actually write “controlZ” ? In addition, I cannot detect the input in the buffer “> “ as shows up in the terminal program. I don´t know if that is why I am not able to send messages…


Well any help with this and/or more info on send-get SMS AT based applications would be great

Thanks a lot...

Marco

Sending IPL Commands To A Printer
Hi,
I need to print labels on an Intermec thermal printer. To do so I need to send special commands to the printer in the form of:

'-------------------------------------------------------------
<STX><ESC>C1<ETX> ' Adv mode 2.5mm
<STX><ESC>P<ETX> ' Program mode
<STX>E3;F3;<ETX> ' Erase format 3 & create format 3

' Send a line of text to the printer
<STX>H0;o700,75;f3;c26;d3,"SOME TEXT TO PRINT";h110;w90;<ETX>

<STX>R;<ETX> ' Save format & exit to Print mode
<STX><RS>5<ETX> ' Quantity of labels = 5
<STX><ESC>E3<ETX> ' Select format 3
<STX><CAN><ETX> ' Clear all data in format 3
<STX><ETB><ETX> ' Print the format
'-------------------------------------------------------------

The question is how do I send those codes <STX>...?
I tried the:
Printer.Print "<STX><ESC>C1<ETX>" ' Adv mode 2.5mm
etc.

but that only prints exactly what's in quotes with the codes etc.
I don't want to print the codes, but SEND them to the printer to control the printer and print data that I'm sending. In the sample above it would print:

SOME TEXT TO PRINT

in the specified position on the label.

Sending Commands To MS-Dos Prompt
I have win 98, and vb 6, My question is how can i send a command like:
"C:jdk1.3java compliemy.java" to ms-dos prompt? and how can i recieve the output? And how do i know that it has completed, the action?

thanks people.

Sending Commands To Local Net
I can send the commands to applications running on my computer. Can I send it to any program running on specified in my local net?


Thanks

Sending PCL/PJL Commands To The Printer Using Vb
Hi,

Can anybody Know how to send PCL/PJL Commands to the printer.
i have to use API Calls to send PCL/PJL commands.
but i don't know How?

PLZ help me,

Thanks,
Anitha

Sending Commands Via Buletooth
In need some examplo where the Pocket Pc will be senting Out AT commands(as in 0-9, dial,end call) via its bluetooth connection to a mobile phone.

Somebody knows where I can find it?

Sending Commands With Winsock
I have read several tutorials on winsock programming and ended up with a pretty cool Instant Messenger that I made... I was wondering how would I send Commands like changing the screen resolution with winsock... No... im not trying to make a trojan... just wanna learn thats all

tHaPuTeR

Sending AT Commands To Modem
Anyone has experience with this?

Sending Ascii Logs To IRC
Looking for suggestions on how I might read a log file in VB6 and send each line to an IRC channel in somewhat real time. The log may be updated every second, or maybe not for hours. I have a program with a winsock control and a form for connecting and joining a channel.

The part I am not sure on how to approach is ..

Should I open the log file, send the lines that are there, then store the last line number that was sent, then recheck the file and send any lines since the last stored line number and loop through this process indefinately ?

I am a noob to VB, but not new to programming, so this may be a redundant question. If anyone has suggestions, I would love to hear them. Thanx

Sending Commands To Excel Windows
Hi,

I was would like to be able to send keystrokes to automatically select "Don't Update" etc. when a window pops up. Currently I have written macros that pull data from external workbooks, however when the new workbooks open often time the option to "Update" or not pops up. I don't want to waste time clicking no each time and would like to just have the macro automatically enter the "n" key to select "Don't Update". Is there any way to do this? Thank you.

Jake

Sending Commands To Minimized Window.
Hi can anyone point me in the right direction on how to learn to send commands to a minimized window.

An example would be - Ok i want to do Sendkeys "lol" to a specific window.

Anyone got any ideas?

Sending Multiple Commands (Shell)
I need to hash data in my program, so I'm using the md5.exe (nice and fast) but I need to get the result back into VB. I can do it using:

md5.exe temp.temp > log.txt

But......I need to change directory first. How can I use the cd command and the md5.exe command in the same shell? Also I know running the program then saving the output is a bit of a round-about way to solve the problem, but I think it's the best way to do it without finding a C DLL or using the MD5 module for VB (sloooooooow)

Sending Bluetooth Commands Using MSComm
Hi to all !!

I want to develop an application with which I can communicate with a bluetooth-enabled device. I have managed to write code to use bluetooth through MSComm but I dont know which commands I have to send to the device. Have you any idea ?

Thanks is advance!

Sending Commands To Minimized Window.
Hi can anyone point me in the right direction on how to learn to send commands to a minimized window.

An example would be - Ok i want to do Sendkeys "lol" to a specific window.

Anyone got any ideas?

Sending Printer Commands [Ressolved]
does anyone of you have a sample code in sending a printer command to a printer? i'm using the Epson LX-300 dot matrix printer. thanks .....

Sending Commands To The Command Line
Is there a way in wich i can send commands to the command prompt for example net send, netstat, ping, etc.
thanks

Sending Esc Commands To A Pole Display
How do I send the Esc Commands from VB to a Pole Display (VFD Dynapos) that is connected to a serial port?
I have the needed Esc Commands sent by Dynapos.
Thanks...

Sending To Word - Some Commands Getting Skipped
I am sending data from my vb app to word. It usually works just great. But some times word can't keep up and it skips some of what I'm sending it.

For instance, if I send the following:

for n = 0 to 5
oWord.Selection.typetext "blahblahblah"
sendkeys "{tab}"
next n

it sometimes misses tabs or even text. How can I slow the process down so that nothing gets missed in the process?

Thanks!

Sending Commands To Comm Port
Is there a way to send information or commands or signals to the comm port?

Getting Window Handle And Sending Commands?
Hi, is it possible to get the window handle of a program, and send a right click command to it (i already have the code for a right click) i just need to how to use it with the window handle. I won't always know what the window handle of the program will be, becuae the program will change. Any help would nice, thanks.

Sending ATDT Commands To Modem
I am trying to send ATDT commands to my laptop modem ...
I tried using MSCOMM control ... but it was no good.

My modem is configured on COM3 Port ... i cannot set the port of MSCOMM to 3... actually the only port it would connect to is 1.

so i need another way to send commands to my modem. Any ideas ?????

thanks.

Sending ASCII Code For At89c51
Hi all

I am new in vb . can u help me about serial port comunication with max232, i want to send word like " My name is Masud" wich Ascii code will be send with also start byte 0A and stop byte 0D code . I can recive ascii code from sbufer. then i can execute my progamme with at89c51.

possible or not?

Sending AT Commands To The Modem Using A Batch File
Hi,

I would like to use a batch file to transfer my home phone line to my cell phone.

The commands I need to send from my phone are:

*73 'to cancel the last transfert
*72 XXX-XXXX 'to transfer my home number to the cell phone
*72 XXX-XXXX 'to confirm that action

Before, with DOS it was so easy. Just a command like ECHO ATDT *73 >COM2 was doing it nicely.

But now I would need a small .EXE file, let's say SENDMODEM.EXE that could send the data to the modem the way I need it.

The batch file could look like that:

SENDMODEM ATDT*73 >COM2
WAIT 2 'a delay that I already have
SENDMODEM ATH>COM2
WAIT 2
SENDMODEM ATDT *72,,XXX-XXXX>COM2
WAIT 2
SENDMODEM ATH>COM2
WAIT 2
SENDMODEM ATDT *72,,XXX-XXXX>COM2
WAIT 2
SENDMODEM ATH>COM2

You see!

Would not be a big deal to do with my old Turbo Basic but it is not working with the pseudo DOS of Win 2000.

Can somebody help me and write for me such a program. I quit programming many years ago and writing that is really out of my reach.

Thanks!

Alain

Sending Commands To External Mediaplayer Instance
I'm tryin to make this prog that will allow me to use my joypad to control mediaplayer (ex: if you hit button 1, media player will pause the current media, etc). I've got the prog to take in the joypad buttons. I just don't know how to play/pause/next/prev/etc.. mediaplayer without putting a separate WindowsMediaPlayer component on the form. can someone pleez help.

Sending Intermec Printer Commands Through Ethernet
Im trying to send printer commands to a Intermec Label Printer through the ethernet, I use to do this through the Serial port and know I'm working with printers that are on network, I know how to print to a printer using the Printer Object but I need to send IPL commands straight to the printer to get status and print labels. I'm trying to do this in VB 6.0. Any help would be great.. Thanks

Stop A Program From Sending Words/commands To Icr
Hello, how can i stop a program from sending "commands/words" like "!auth", "goodbye","hello" to a hidden irc server in the program?

When i ran a paketsniffer i saw some of those commands were sent to irc users, how can i disable certain words like "!auth" to be sent?

thanks,
naitsabes

VB Application Sending Commands To AS400 Client
Hi All,

I have a VB application that connects to the IBM I-Series client and
sends some keystrokes.


I am connecting using PCOMM with the following code:

CODEDim autECLSession As AutConnList
Dim autECLPS As AutPS
varSerial = frmMain.txtSerial1
Set autECLConnList = CreateObject("pcomm.autECLConnlist")
Set autECLPS = CreateObject("pcomm.autECLPS")


autECLConnList.Refresh


'Connecting to Session A


autECLPS.SetConnectionByName ("A")


autECLPS.SendKeys "[FLDEXT]"
autECLPS.SendKeys "1" & "[ENTER]"
autECLPS.SendKeys "1" & "[ENTER]"
autECLPS.SendKeys "STK" & "[ENTER]"
autECLPS.SendKeys varSerial & "[ENTER]"

Sending ASCII Command To Printer Issue *** Thank
Have someone used to send ASCII command in order to control printer from VB?

I'm trying to create a barcode printing program ,that support ASCII command.

For example, I would send below ASCII to print a barcode

B0,0,10,N,"23240015MI03435"

but I've no idea.

Thank in advance..

Need Help Sending ASCII Characters (text :p ) As Keystrokes To A Game
Hmm it's been almost 24 hours and my original post only got 4 views and no reply on the API forum, soooo I decided to give you a link here (there's no point in copying the whole post, right?). The thread is this one:

http://www.vbforums.com/showthread.p...postid=1368801

Please, at least read a bit of it and if you have ANY idea, tell me! I need an easy way to convert ASCII characters to key codes (I don't wanna have to go through each one of the 256 characters and try to guess what is the corresponding key code)...

Extended Ascii/unicode String Conversion To Stanard Ascii
I encountered problems when sending certain characters from Windows VB to IBM Mainframe Cobol/DB2 such as
‘(left single quote) or ’(right single quote). All the characters after the extended ascii got cut off. I don't have problems when sending '(single quote).

Is there any vb functions to convert it? Or maybe changing the  
XEOLEDB mapping below would fix it (sample code below)?

{L"DESCRIPTION4", NULL, 68,STANDARD_COL_FLAG, 56, DBTYPE_BSTR, 0,0,0},


I am not familiar with IBM Mainframe and the service connecting VB to it. My only solution right now is to use the replace function but I am afraid there will be a performance problem.

thanks
clark

Vb Commands For Executing System Commands Needed
I would like to be able to execute dos commands, or start othe r programs from my programs but don't know the vb commands for doing it. In C the command is system(); is there an equivelant in basic

Detecting If Ascii Keys Are Pressed, Eg Ascii(31)
I need to be able to detect if someone presses a key like "1" by using ascii keys

so like detect if ascii(31) is pressed

i need this for 2morrow so help!

~

Convert Ascii Constant To Ascii Value With Program
How would I go about doin the following? If a string contains "vbKeyF1", how would i get vbKeyF1's ASCII value equivalent (ie: 112) to be written in another string?



Edited by - Marce22 on 10/10/2003 7:04:38 PM

Data Conversion: EBCDIC-&gt;ASCII , ASCII-&gt;EBCDIC
Is there command to convert an EBCDIC string to ASCII and the other way around?

Tom Cannaerts
slisse@planetinternet.be

The best way to escape a problem, is to solve it.

Sending Image Over Winsocket Without Saving File.. (sending Directly)
I am trying to send images of the desktop to a remote computer for a while now... i managed to do it with bmp format but that is just to big.. i tried jpg but still isnt really fast.. is there anyway to send a part of the image without even saving the image?

i tried sending through a long value but can't seem to set the other picture to the long i recieved :S




btw i tried searching the board with no codes nor results answering my question :S

Copyright © 2005-08 www.BigResource.com, All rights reserved