Send A Control String From .NET To A Serial Port?

Aug 5, 2010

I am trying to send a control string from VB.NET to a serial port. I am using a pololu trex jr. on the receiving end of the serial port. I have attached a copy of my current code which compiles without errors, but fails to send data. I can tell that it is not sending data because I have a light on the control board connected to the port and it normally blinks when data is received. The program that came with the board drives it perfectly but does not serve the purpose I need it to. I am open to any suggestions as I eventually plan to write a class to contain the control routines.

View 12 Replies


ADVERTISEMENT

Send Data : String Through Serial Port?

Mar 11, 2010

i knew Serial ports are a type of computer interface that complies with the RS-232 standard. They are 9-pin connectors that relay information, incoming or outgoing, one byte at a time. Each byte is broken up into a series of eight bits, hence the term serial port.And I want to write a program chatting through Serial Port.

View 3 Replies

Send String Through Serial Port To Arudino?

Apr 18, 2012

im very new to visual basic. as in i just started 2 days ago. Currently i have a little program written up that has a couple of radio buttons and then a submit button. when you select a radio button and click the submit button, a little message box with pop up and say "you selected such and such"

Well now im trying to make something that will send a string to arduino through the usb cable. Basically it will use the same set up as stated above but instead of a pop up message it will just send the string through the port. for example Radiobutton1 - when selected and submit button pressed will send "1" (no quotes) through the serial port Radiobutton2 - when select and submitted will send "1" and then maybe "3"

and so on and so. Some radio buttons will only send 1 string through them and some may send multiple. Now, i dont need help with arduino, i have that already set up to wait for the strings to come through the com port. just need to figure out how to do it in VB.

View 1 Replies

Send *.Hex File Via Serial Port To A MCU?

Sep 11, 2009

sending a hex file through serial port using vb.net? and i m not really sure the difference between sending data and sending a file, seems majority of the topics on the forum is about sending data via serial port.

View 2 Replies

Send Keystrokes To A Serial Port?

Mar 11, 2010

I am trying to send a ctrl-x keystroke to COM2 and I ahve to code to open the port and read and write but when I tried to send Chr(Keys.ControlKey + Keys.X) it did not work

View 1 Replies

Using Chr$ To Send Data To The Serial Port?

Feb 18, 2011

I used this code in the pass with VB6 to send hex data over the serial port to a microcontroller.

MSComm1.Output = "C"
Send command ID
MSComm1.Output = Chr$("1") Send Command Parameter
MSComm1.Output = Chr$(CStr(240)) Send CR

I need to convert the code using VB2010, but Chr$ is not available, and anything I tried will not send the actual ascii code character......

View 10 Replies

Send And Receive Data From A Serial Port?

Jul 8, 2011

I have created a program to send and receive data from a serial port, some of the data needs to be stored in certain strings for a export to excel. However the data takes while to to send be sent back. So in order to get the right information in the right strings I have to put pauses in my code. I have added a timer to my form:

On my timer's tick event I have the following code:

Public Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
iTick = iTick + 1
End Sub

View 3 Replies

VB 2010 Send Hex Values Across The Serial Port

Jul 18, 2011

I want to send hex values across the serial port. I know, I know, your thinking not this again. But what I need to do does not seem to be addressed, or I am some how missing it when I search around.

[Code]...

View 2 Replies

VS 2008 Serial Port Can't Get To Send Strings

Dec 8, 2010

I've set up two computers, with a null modem serial cable. When trying the connection in two Realterm windows it works ok to send strings.I'm trying to write a simple project that sends the timestring over the same port.One button sends the timestring. I've created one other sub "AppendLabel" that just updates a label.text so I can see what's happening.[code]

View 8 Replies

Communications :: Send 8-10 Character Strings From The PC Serial Port?

Dec 1, 2011

I have quite a bit of VB6 experience but now am trying to create my first VB.Net project. The project is very simple - it just needs to send 8-10 character strings from the PC serial port. The problem I'm seeing is that VB.Net is always sending out a 0x0A character after each 'WriteLine' call. Using VB6 it was necessary to manually send out any End Of Line characters. My application requires that no extra EOL characters be sent after the string.

View 2 Replies

Send Data On Serial Port And Detecte It In Same Program?

Feb 24, 2011

I am supposed to make a software for data logging via serial port but the hardware is expected to be delayed and iam required to continue with the programming of the software. What i need is that by some mechanism i want to send data on serial port (COM port) and after delay of some mili seconds i want to detect that data. I actually want to do this because i want to create environment like my software i intercepting COM port and on receiving data it captures the data values on port and record them to database. I have done most the work, the only thing left which i want is as above how i will send data on COM port (this was to actually to be done by hardware) and detect it in my program (same program from which data was sent). Please guide from where should i start.

View 3 Replies

Send XML Commands In Vb To Get Data Received Over A Serial Port

May 5, 2011

How do I send XML commands in vb to get data received over a serial Port?

I know the commands I'm just not sure how to send them.

View 2 Replies

Use A Textbox To Send Binary Data To Serial Port

Sep 1, 2009

I am currently sending data via a serial port to an AVR microcontroller. I've tried searching the forums here first but haven't found any posts that specifically deal with what I'm trying to do. Here's some additional information that might help before proceeding:

Sendbox = textbox
ReceiveBox = listbox
ReceiveChk = checkbox

I currently have it setup so I enter hex data in Sendbox, click the button, it sends the data to the AVR micro via the serial port, which gets repeated back through the serial port and receives the hex data in the ReceiveBox. I want to be able to setup something similar so I am able to input data into a textbox as binary and have it sent to the AVR that way.

I realize it will send the same data whether I enter it in hex or binary form. I just want the option of being able to send it in either form.

Below is my code.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendButton.Click
SerialPort1.Open()

[Code]....

View 1 Replies

Serial Port Communications - AT Commands - Send And Receive Data

Apr 12, 2009

I have a USB modem that can detect caller ID and can detect dialled digits when special AT commands activated, How to send and receive data. The sent data will be the AT command such as AT+VCID-1 to activate the caller ID, the received data will be caller ID information and the digits dialed. I'm new to prgramming and using Visual Basic 2008 Express.

View 8 Replies

VS 2008 Writing Some VB2008 Code To Control Four 7-seg LED's / Serial Port Control?

Nov 10, 2010

I'm writing some VB2008 code to control four 7-seg LEDs I bought from Velleman. They came with some example code in VB 5.0, and with instructions telling me to input 5 bytes at a time in the format Chr$() & Chr$() & etc. for the rest of the 5 bytes. When I try to do this using VB2008, it rejects the $ sign, so I've tried it using the Chr() format, which VB2008 allows. However, it doesn't work. Is Chr() the new version of Chr$() or are they different entities? In sending data to the LEDs, I'm using LiveComPort.WriteLine() as my command. (My serial port is called LiveComPort) I also tried it with LiveComPort.Write() asthe command. I know that my serial port and the LEDs are working, because they respond to the demo program provided by Velleman.

View 7 Replies

Check If String, Which Receive Via A Serial Port Matches To A String In A Database (access)?

Jun 22, 2010

I got an app, which receives data via a R232 port, convert it to a string and on the other side I got a database, where the strings are saved. How can I find a way to compare the string with all strings in one database column and get back the another stringform the same row in this database. I never programmed a database

View 1 Replies

Serial Port - String To Hex

Nov 14, 2011

I m writing serial port program i can send hex data without any problem but i stuck when I get response in buffer for example response is a string "?-??"

[Code]...

View 22 Replies

Reading Serial Port Read Data From Serial Port?

Aug 16, 2011

i am a absolute beginner and i want to use vb to receive data from micro controller through serial port using rs232 standards, i found this code to receive the data serially, can any one tell me where should i paste this code, so that the data received will be displayed in message box.Private Sub DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) HandlesSerialPort1.DataReceived

[Code]...

View 9 Replies

Serial Port Example Code - Connect To A Modem Thru The Serial Port

Oct 26, 2011

The link below has code to connect to a modem thru the serial port but it is for an earlier version of VB. when I convert the code, it does not fully convert and has 4 errors that prevent building the project. can someone tell me what needs to be changed or added?

[URL]

Note: the error: not CLS-Compliant

View 8 Replies

.ost File For Serial Port Control?

Dec 7, 2010

i trying to make a control for serial port to send a string "1" to serial port , but i don't want to use a form. I want to be able to save as .ost file or be able to input it into outlook 2003 macro to use as a script. can someone get me started on how to name, open, set, write to a serial port without using a form? just to use as a macro?

View 2 Replies

VS 2008 Serial Port Control?

Nov 18, 2009

All these days i used to program in Vb6.0. Now since from last 15 days I have been using Vb2008. In Vb6.0 I used MSCOMM for serial communications. Here in Vb2008 I found Serial port control equivalent to it. I somehow managed to learn how to send data using serial port control and set parameters like baudrate , stopbits , etc. But I' not getting how to get the received data. In VB 6.0 we used to use comEvReceive in OnComm event and used MSCOM1.Input to get the received data. But I'm not getting how to do the same in vb2008.

View 2 Replies

Reading From Serial Port Into A String

Oct 22, 2009

For starters I'm using VB 2008 express edition.I have code that writes a string out of a serial port.My issue is that the machine sends data back and I don't know how to catch it.This is my latest attempt at creating an array of characters to create a string later but doesn't work.[code]

View 2 Replies

Reading String From Serial Port

Mar 2, 2010

I do not have much experience with VB.What I need to do is to read a serialport as a hexadecimal string.I've done this with the MSCommlib, but now want to convert to system.io.ports.The equipment wich is connected to the serialport is a RFID card-reader, so the application haft to detect when it is receveing data, and then continue on.[code]

View 5 Replies

Any Way To Write Data To Serial Port To Control Toy Car?

Feb 6, 2012

I just need to write data to serial port to control a toy car
Moving left, right, forward, back.

View 2 Replies

VS 2008 Control Laser Via Serial Port?

Mar 23, 2011

I have created a laser that can be controlled via the serial port. I've written the code to switch it on/off and it works fine. How do i make it strobe? Here's the code to switch it on, to switch it off is similar (don't ask why it is like this...i think it's the transistor from the circuit board that switches the signal):

[Code]...

View 4 Replies

Writing To A Serial Port Using Mscomm32.ocx Control

Jun 17, 2010

In my windows application I am using Mscomm32.ocx control for serial communication.

I set the control properties like below in the Form1_Load event.

AxMSComm1.CommPort = 1
AxMSComm1.Settings = "9600,N,8,1"
AxMSComm1.InputLen = 0

[Code]....

View 7 Replies

VS 2008 Using Serial Port To Read String?

Jun 9, 2009

I have an application in Electronics to communicate with serial port. With using VB I have succesfully read a character using

Serialport1.ReadByte
or
Serialport1.ReadChar

[code].....

View 5 Replies

C# :: Read Serial Port Control Line States With .net?

May 10, 2011

I'm working on a project where I need to trigger an event when a switch is closed. It is my understanding that it is possible to use the control lines on a serial port and read whether the switch is closed or not. I've found a schematic of how to connect the switches to the pins, but I have not been able to find any example code on how you can read the state of the switches.

View 2 Replies

Using MSComm32.ocx Control For The Purpose Of Serial Port Communication?

Jun 16, 2010

In my application I am using MSComm32.ocx control for the purpose of serial port communication.
when i am using it I am getting a following error while writing data to the port.

"AxMSComm1.Output {"Exception from HRESULT: 0x800A018A (CTL_E_GETNOTSUPPORTED)"} Object "

I am writing the output to the port like below. AxMSComm1.Output ="Hello"

I mention the properties of the ocx control in the form load like below. AxMSComm1.CommPort = 1

AxMSComm1.Settings ="9600,N,8,1"
AxMSComm1.InputLen = 0
AxMSComm1.PortOpen =True

I searched for this error in the net.But I am not found any information for this issue.

can anybody explain why I am getting that error and how to resolve it???

View 5 Replies

Display The Serial Port String In A Label Or Text Box?

Dec 19, 2011

I'm trying to read a string(what's going on) from my Arduino and display it in either a label or text box. but its not wanting to display the characters, or string i want it to. So I could really Here's the code I have right now:

Imports System.IO
Imports System.IO.Ports
Imports System.Threading

[code].....

View 14 Replies







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