Stop The Serialport.write Command To Send "0D 0A"?

Oct 10, 2009

I am using Visual Basic 2005 and Serialport class. My target device is a WinCE 5.0 Emulator.When I send bytes using serialport.write(byte(),offset,count), the serial port always output "0D 0A" between the bytes and after the bytes sending complete. like this:34 0D 0A A5 5A 0D 0AHow to stop ouput the '0D 0A"? It seems like a terminator "", I have tried to search the serial port settings but cannot find the proper setting. The seiral port is 19200, no parity, one stop bit, 8 bits.

Imports System.IO.Ports
Imports System
Imports System.Windows.Forms

[code]....

View 6 Replies


ADVERTISEMENT

Send A Tare Command To A Weighing Scale Through Rs 232 Using Serialport Control

Aug 27, 2009

i am developing an application which needs to connect to a weighjng scale throug rs 232 and capture the output. after inserting the record however the pc needs to send the tare command to the weighing scale in order to set the scale to zero. now he tare character as far as i guess ia T i sent the command like this

serialport1.write(chr(27) & "T" & chr(13) & chr(10))

View 1 Replies

Write The String "AABBCCDDEEFF" Then Click Send Textbox2 Will Then Display "BBCCDDEEFF" Or Just "DDEEFF" - Serialport Writetimeout

Aug 18, 2010

I have set up a serial port program, where the serialport writes from textbox1 then reads to textbox2 when you push a send button.The problem is the serial port seems to have its own writetimeout function. here is an example of my error:

say I write the string "AABBCCDDEEFF" then click send textbox2 will then display "BBCCDDEEFF" or just "DDEEFF"

what seems to be happening is that it will kick in whenever it wants to and just read portions of the text sometimes it will even seperate it out into two or three lines.

This only happens about 1 out of 5 times when I hit send, but it is an error that I would still like to have fixed.

View 12 Replies

SerialPort Object - Sending Command To Slave Device?

Jun 12, 2009

I am having a little trouble with the serialport object in VB2008. I have a program that will send a command to the slave device however the program will not read the data from the slave device. I know my computer is communicating with the slave device because in hypertem it has no problem. For example I send the word "AT" and I should get back a response of "OK",

View 9 Replies

VB2008 Send 00h To FFh In One Byte Using SerialPort

Feb 1, 2010

peoples The User of my application will enter Hexa values in text boxes (00h to FFh). I need to send these values through the serial port, but so that EACH text box with values 00h to FFh ONLY generate ONE transmitted byte, exactly the value placed in the text box.

Just found examples of this application in VB6, using the following command:

MSComm1.Output = (Chr(Val(txtText1.Text)))

In VB2008, you use the component "SerialPort", and one of the methods for transmitting data to the output buffer is "Write". So I did it this way:Dim As Integer ValHex

[Code]...

View 3 Replies

Save Data And Send To Serialport Periodically?

Oct 14, 2009

I have a program where I need to periodically save the data to a database (if the computer suddenly shutdown) and also send the same data to a serialport.Alla data that is going to be sent and saved resides in two classes.his needs to be done every 1/10s.What's the best way to manage this?

View 2 Replies

Send A Command To A Command Line And Then Submit The Command?

Apr 30, 2010

First let me say that I am not sure whether or not this should go in this section or the API section, and if it needs to be moved I apologize. My issue is fairly straight forward, but for some reason I cannot get it to work.

I am trying to send a command to a command line and then submit the command. I have been trying without success to get this to work in v2008 Express and v2010 Express, Here is the code I am trying to us:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String _

[Code].....

View 6 Replies

Serialport Write In VB Not Sending 0 Character?

Sep 21, 2010

i am wrting a modbus RTU code for communicating with devices I intend to end modbus query with wight bytes to be sent 1 , 3 , 0, 3,0,5, &h79, &hc5 the third and fifith bytes which are zero are not actually writen into the commport How to do this ?

View 2 Replies

SerialPort - Read / Write Files And Stuff

Oct 3, 2011

I have one project that I need help writing that I have spent months trying to write with no luck. Anyway so here is my question. I want to write a program that can display a phones filesystems that is connected to my computer by a serial port. I would like to be able to Read/Write files and stuff if possible. I have tried many ways of doing this so this is my last resort.

View 5 Replies

Receive Data From Serialport & Send It To Anthor Pc Running My Program?

Sep 3, 2010

how to recive data from serialport & send it to anthor pc running my program & resend to the same serialport on the other pc?

View 4 Replies

Using Psexec.exe From PsTools To Send A Command To A Remote System To Fire A Command

Mar 17, 2010

I am currently using psexec.exe from PsTools to send a command to a remote system to fire a command through a command prompt however I am finding that the shell I am doing does not seem to like the spaces in the path.

[Code]...

View 3 Replies

Send Command To Command Line From Windows Form Application?

Mar 11, 2010

I am trying to send a command to the external command line (cmd.exe) from the Windows form application that I'm writing in VB.NET (using VS2008).

I can only access the external program thru the command line (its not my program) and I must do so from a form app.

I am trying to use the following code. I am able to call a cmd.exe window, but I can't pass the command line my command.

Using mp As New Process
With mp.StartInfo
.FileName = "cmd.exe"

[Code].....

View 8 Replies

Struct Used - Serialport.write() But Have To Use Byte[] In BeginSend() Network Tcp Programming ?

Dec 7, 2009

I have a basic confusion between serial port and network TCP communication to devices.

My colleague uses a vb struct as the nice easy to read way to create a packet to send out via a serial port. Like this basic code sample below of his vb.net serial call followed at bottom by my c# tcp beginsend network call.

Can I use a struct as well to call out for my TCP network beginsend? By looking at the signature of BeginSend(Byte[] as the beginning of the signature for that method call to send data to a connected socket, I don't see myself being able to use a struct.

Public Structure PacketRecord
Dim SourceAddress As Integer
Dim DestinationAddress As Integer
Dim Length As Integer

[CODE].....................

View 3 Replies

Stop App From Command Prompt?

Feb 22, 2009

Before posting this question I have carried out a few searches on this forum but I am afraid I am struggling because I am very new to Visual Basic and although I do have some programming background, yesterday was day 1 and I took a web tutorial and watched a few video tutorials. (Long way to go!).

OK to the question and I know I should really not ask 2 but It's better to get them both in one post I think.

I want to build a small utility to run a form in full screen to basically hide an old application running in the background.

My old application is a database (Non VB code) which works very well but while it batch exports a lot of data the software displays some pretty ugly windows, I want to call my VB utility from a command prompt with 1 or more switches to display some meaningful text about where it is in the routine.

I also want to be able to send a switch at the end to close it completly.

Q1 - What is the best way to manage command prompt switches ?

Q2 - How do I make it close itself ?

View 7 Replies

Write Some Blocking Code Much Like The "Serialport.ReadLine"?

Oct 10, 2009

I am running a socket client and need to write some blocking code much like the "Serialport.ReadLine" code which blocks for X amount of time before either throwing a time out exception or returning the string revived. I need to do the same thing with the client socket, basically bloxcking until a CRLF has been detected or a time out has occurred. What is the best way of doing this?

View 2 Replies

Stop Command Execution And Restore To Initial State?

Nov 24, 2009

I am checking to see if a textbox contains a number, or is null. If it is non numeric or null a message box appears asking the user to input the proper value. When the user clicks OK on the msgbox the program will continue to execute the code. I want it to stop executing the code and revert back to its default state as it would be if you just opened the program. What is the command for doing this so I can add to the if statement?

Dim numCheckV as boolean
numCheckV = IsNumeric(Vinput)
If numCheckV = False OrElse TextBox1.Text = "" Then
MsgBox("Please enter voltage!")
End If

View 3 Replies

Write Some Functions To Stop From Having To Use The Same Code Over And Over In Program

Feb 13, 2010

I have a program and the program works fine. The only thing is that I want to shorten it up and stop using the same code over and over. I use the same redudant code through out the code. I want to write some functions in order to stop from having to use the same code over and over in my program. I wanted to know if someone could help me with functions: Here is part of my code below.

[Code]...

View 3 Replies

DOS Net Send Command Use In VB?

Oct 18, 2011

I use below code to run DOS command Net send through VB code but not work I need help to solve this problem Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

View 1 Replies

Send The Command In Hex?

May 24, 2010

I am new to programming and VB.. so go easy my buffer is about full :) I am trying to talk to a box with serial port and only need to send the command in hex. here is the protocol for the device and my code below it to turn on the box. I am not calculating/sending the correct checksum because if I sniff the string being sent to the box from another piece of software that comes with it I get 04 1C 01 DF (spaces put in for clarity) and it works. my code produces 04 1C 01 21..

View 17 Replies

Write A Code To Stop User From Entering A Duplicate Course Id

Mar 9, 2012

I need to write a code to stop user from entering a duplicate course Id and I am having trouble.[code]

View 2 Replies

AT Command To Send Scheduled SMS?

May 25, 2012

Is there any AT Command to send Scheduled SMS from PC via GSM Modem?

View 1 Replies

Can't Send Command Using Pop3?

Jun 3, 2012

my problem is i can't send command using pop3 in vb.net every time i try to send its nothing happen but i can connect in tcp client server and server reply +ok when i connect

View 10 Replies

Send A Command To A Server?

Jul 28, 2009

how to creat a client and a server and pass text between them (like a messenger), and it works just fine

so my question is : how do I send a command to the server, for example, open a program (like notpad) or do tasks or search the remote pc or even shutt it down??

note that am not trying to make a trojan or anything like that, I have two pcs and I was just wondering how to do it ?

View 3 Replies

VS 2008 Send Key's Command?

Mar 17, 2009

i have a textbox that my mouse double click's on so it highlight's the text and i need it to copy that text

sendkeys.send({^+C})

i know it's something like that but it's not working for me i just need to send ctrl+c to copy it and i dont know the code's

EDIT> k someone gave me the code it's
System.Windows.Forms.SendKeys.Send("^c")

now i need the space key what is the code for it i tried this and it dident work

SendKeys.Send("{SPACE}")

View 7 Replies

VS 2005 - Make A Program Intercept And Stop Certain Write Requests?

Sep 1, 2009

Is it possible to make a program intercept and stop certain write requests? I need it to stop viruses from tampering with an antivirus database. If you can, how do you do it? If not, is there another way to stop viruses from changing the database?

View 39 Replies

Delay The Execution Of The Send Key Command?

Apr 16, 2012

I am trying to delay the execution of the send key command. In VB script, it was relatively easy:

obj.sendkeys "{enter}"
wscript.sleep 1000
obj.sendkeys "{tab} {tab}"

When I do it via VB express, it is clumping the code together. For example

Threading.Thread.Sleep(5000)
SendKeys.Send("enter was entered ")
Threading.Thread.Sleep(5000)
SendKeys.Send("double tab was input ")

Instead of pausing for 5 seconds, typing the keys then pausing for another 5 seconds, it pauses for 10 seconds and then immediately types the input. I tested this on notepad.

How do I replicate the sleep feature in VB script into VB? There appears not to be a sleep feature in VB Express 2010

View 5 Replies

Send A Command To Another Instance Of My Program In Net?

Jan 12, 2010

I have a program that needs to see if it is already running and if so bring the other instance to the front and then close itself. Now I figured out how to see if another instance of the program is already running using GetCurrentProcess, but how do I tell the first instance to "BringToFront" from the second instance?[code]...

View 3 Replies

Send Commands To CMD ( Command Prompt )?

Jun 24, 2011

In my application I have only one button . That button will open CMD then it will send a command into cmd , now after that command it requires an "enter key" to continue the process .I tried the shell command in order to access the command but then I couldn't press enter in cmd using my application

View 4 Replies

Send Commands To Command Prompt

Dec 13, 2011

I am trying to send commands to Command prompt.The following code should open the text file I specified.However it opens several instances of the cmd window and also several copies of the text file. Sometimes the text file is not opened and if the file path is long, part of the file path gets inserted into my text file.[code]

View 1 Replies

Send Keys To Command Prompt?

May 25, 2009

I have an application that will open a command prompt (cmd.exe), and then types "ipconfig/renew". How do I send the enter key, to execute the command?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved