VS 2008 - Sending Data To A Comport

Nov 2, 2010

I am having trouble sending data to a comport..... I am a noob at this and have been doing my head in... I have done a fair bit to a few programs that I have on the go, but am stuck at sending some data to the comport...

I have in form1 put the serial port contol and added SerialPort1.Open() to that. I have then added 3 buttons that I was to use to send data to the port... Since this is for a radio scanner the buttons turn the backlight on / dim and off.....

LTN is used to turn the light on and works fine in hyperterminal.. I have got the port settings right in vs2008 but the code is wrong.

I have:

code:

Then I get warning of Name 'LTN' is not declared...

View 8 Replies


ADVERTISEMENT

Have A Program Which Will Read Data From Comport When Ever There Is Data On Comport?

Dec 4, 2009

I have a program which will read data from comport when ever there is data on comport. I am using Comport.DataReceived event to do that.My program will receive data very frequently and it is working fine. The problem is, it will work for 3 to 4 days fine but after that my receive data will slow down. I am receiving data with high delay (about 10-15 min).There will be continuous data to my comport.

View 4 Replies

VS 2008 Send Data From USB To ComPort?

Dec 25, 2009

I have a barcode scanner which sends data to USB Port. I want to redirect it into ComPort. So that I can manipulate it. How can I do It in Visual Basic 2008 Or how to convert usb port to ComPort in Visual basic 2008

View 1 Replies

Get Listbox1 To Be The Selected Comport Used To Do The Send Data And Get Data Back

Nov 14, 2011

I have two issues I am trying to correct...First am trying to get my listbox1 to be the selected Comport used to do the send data and get data back.

My second issue is its requiring me to send two times to get my read data back as complete data and has odd shapes with the data I get back in front of and after the regular txt.

Beware, I am very new at this so please take it easy on me... Most help I did find was for older versions I only have the 2010 Visual studio Professional...

Public Class Form1
Sub GetSerialPortNames()

End Sub

[CODE]...

View 6 Replies

Read Data From Comport And Display It In Text Box?

Dec 25, 2009

I am trying to read data from comport and display data in a rich text box.

View 2 Replies

COMPort Reference In Subroutines VB Express 2008

Sep 21, 2010

I'm trying to communicate through a serial port with separate subroutines for establishing the connection to the device and handling routine messages. I'm able to establish the connection, but reference to the COMPort in another subroutine fails with a message that the port is closed. I can successfully communicate using COMPort.Write commands within the connection subroutine, so I know that works. How do I pass a reference for the comport to other subroutines?

[Code]...

View 6 Replies

VS 2008 Sending Data To A Webpage Via POST, Data Not Getting There

Jun 16, 2010

I've code this code below:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim hwrRequest As HttpWebRequest = HttpWebRequest.Create("http://www.example.com/web-service.php")

[Code]....

The MsgBox() at the end shows the response, which as I've added to my script, echos the result from the $user and $pass variables which are supposed to retrieve those details being written to the stream above, but they show up empty.

I'm retrieving those values by doing: $user = $_POST["user"]; $pass = $_POST["pass"];

View 9 Replies

VS 2008 Sending Out Data From One Pc To Another?

Dec 10, 2009

I have a program that I collect data using a com port. I display that using special visual controls - no problem here.

What I would like to do is to send this same information out over the network via ethernet to another PC located in another room.

I presume I would have to have another copy of the program on the second pc as the information is simply duplicated but I am not sure how to get the data out of one to the other

View 2 Replies

VS 2008 - Sending Data / Passing Value Between Forms

Dec 15, 2009

Imagine a project with couple of forms and a module. Now as per my knowledge if i want to send some data from one form to another then :

- If I declare variable friend/public in a module then it can be accessed in the entire project (thus also between forms).
- If I just have to send data from one form to another, then I can call the other form's sub/function and pass value.
- If the pass value by reference then I can get new value only if its changed in that function.

Now what the issue is, I need to pass a variable to a form and in that form when user types contents in a textbox or makes other selection and presses OK button then it should return some values back to the calling form. Now how can I achieve this (without declaring global variables which will be accessible everywhere) ?

View 14 Replies

VS 2008 Sending And Receiving Data Via Com Port?

Aug 16, 2010

I have a very basic knowledge of coding, just enough to understand some PicBASIC Pro and program a microchip to send the values of some variables to a PC via the com port. I've used a terminal utility like Hyperterm to confirm the right variables are being sent, so I thought it would be cool to have a custom application on the PC to display these variables, and possible set them via the application by writing the new one back to the PIC. So I downloaded VB express 2008 - and whilst it was "simple" to draw a box and add a few text boxes I'm lost at how to actually do anything practical with it

[Code]...

Could someone advise me in laymens terms exactly what I need to do inorder to populate the text boxes with the data from the PIC micro. Whilst I understand the basics about BASIC, I have no idea on things like classes etc

View 5 Replies

Sending/Passing Data To UserControl Textbox VB 2008?

Oct 2, 2009

I have a form that loads a UserControl which has a tabpage. Each tab has textboxes that I need to update when I create the tab page. I actually had this working but lost a major version of the code and can not remember how I did it. I want to send data to usercontrol this way from the form Do While

count <= intGrpSize With TabCtrlClient() .TabPages.Add(New TabPageEx) UC.SetSessionDate(tbSessionDate.Text) uc.SetCouncelor(CInt(cbProviderID.Text))

[code]....

View 2 Replies

VS 2008 - Sending Data From Client To Server (No Communication)

Oct 13, 2010

I'm not sure what I have done wrong, I am trying to get my program to send data (UsernamesPasswords) from client to server, then the server says if it's right or wrong.

The error is on this line:
Dim networkStream As NetworkStream = TcpClient.GetStream()

Heres the Client:
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("You must enter UN/PW!")
[Code] .....

View 4 Replies

GPIB Communication - Sending Data - Receiving Data - Saving Data

Sep 19, 2010

I need to control a device with a GPIB port. I have the commands that I need to use to do this; but I don't know which is the sintaxis in Visual Basic.

For example if I need to send a instruction like "START:0.01" to the external device which are the libraries that I have to include?, how should I write the programming line to do this?

The main tasks that I need to program are sending data, receiving data, and saving data

View 5 Replies

How To Change Which Serial Comport Is Being Used In Code

Nov 20, 2010

im currently working on a program which prints serial text to an aplication like note pad. the problem im having is that i cant figure out how to change which serial comport is being used in code. i want the user to chose the comport with a check box.keep in mind that COM1 in my code is what i called my check box. here is my curent code:

Public Class Form1
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
Shell(OpenFileDialog1.FileName, 1)

[code]....

View 1 Replies

Send An Image File Through COMPORT?

Sep 28, 2009

I would like to ask about sending an image file through serial port to a external embedded processor....

the way i think i want to do it is that i would like to open the image file in VB.NET as a binary file and then

1)either converting this binary file to a text file and then read the content of that text file to sent it through UART to that external processor or

2)Converting the binary file into an array and send that array through uart.[code]...

View 3 Replies

USB Device Identification & Comport Mapping?

May 6, 2007

I have a USB gadget that appears to Windows as a USB serial port, there is no special driver.I know the USB Vendor ID, and the USB Product ID, I need 1 or 2 functions:

First: IsThisUsbDevicePresent( Vendor_ID, Product_ID )

Second: Some means of transforming the above into "COM1" or "COM9" or what ever it is so I can call it. And that- should be doable from VB...

View 1 Replies

Coding For Comport Signal To Trigger Event?

Oct 23, 2009

Im connecting a infrared transmitter by serial port, Rs232 to my pc. Anyone know the coding for the comport to detect the signal and auto trigger a sms event(by gsm modem) ??????

View 4 Replies

Communicating Trough A RS 232 Comport To A Modbus Protocol Controller?

Apr 19, 2010

I need to interface between a PC and a Microcontroller based Controller to transfer data between the PC and the Controller?

Ive got acces to the register numbers or names in the Microcontroller.

View 2 Replies

TCP Receiving / Sending Data

Nov 11, 2009

Im woundering how does Receiving/Sending data work in a TCPClient/Server that is connected in the same networkstream.

View 4 Replies

.net - Sending Data From VC++ To VB In A .NET Framework?

Mar 2, 2010

I'm having a heck of a time figuring this out, the tutorials I found on the web are not complete or are for VB 6.0 (obsolete in some cases). On the C++ side I have the following ::

hwndExternalApplication = FindWindow(NULL, L"Dromocast Client");
SendMessage(hwndExternalApplication, WM_SETTEXT, NULL, (LPARAM)"Hello");

"Dromocast Client" is my visual basic application, and I checked to make sure it's not NULL. In fact I get made sure I'm getting some data on the VB side. On my Visual Basic side I have the following

[Code]...

When I send the data over it's garbage, meaning strTemp comes out as all these chinese characters, and my title bar on the visual basic program gets garbled with a bunch of chinese characters as well. My guess is my "SendMessage" is written wrong, or I'm doing something silly, but I have no idea what. I'm not a windows programmer so I'm kinda trying to figure this stuff out by googling.

View 3 Replies

Determine Whether Data Is Sending In?

Jan 5, 2010

I am currently writing a visual basic program that gets data from a serial port. everything is connected up but the data is not received until my device on the other side is turned on on the other side. which condition can i use in my loop to ensure that i only start comparing when i have started to receive so that my loop will not hang as there is no data input?

View 1 Replies

Sending And Receiving Data To Or From PIC Through RS-232?

Nov 14, 2011

Currently I had write a simple VB code, my aim is when i click "Forward" button then the vb will send a character "A" to PIC, "Reverse" button will send "B" so I write my vb code for sending as below:

Dim Forward As Char = "A"

SerialPort1.Open()

SerialPort1.Write(Forward)

For the receiving part, after I received the data from PIC then I will show it at the label which act it as a screen. the receiving code as below:

SerialPort1.Open()
receive = SerialPort1.ReadChar()
If receive = "A" Then[code]....

View 14 Replies

Sending And Receiving Data Via USB?

Dec 4, 2011

I am working on system support for an electronics project wherein I have to receive an 8 bit (binary) data through a USB port and store either the binary or the corresponding decimal into a variable. How can I implement this in visual basic 2010?

View 11 Replies

Sending Data Between Forms

Dec 1, 2010

i have a similar question so i thought i might post it here rather than clutter the place with a new thread, if that's okay.first off, i'm using VB 2010 Express, if that makes any difference.second, i'm trying to send data to form2 from form3 rather than the other way around. i'm still pretty much new to VB, but have a lot of experience in PHP and some in java. i'm making a basic program that creates critters on form3 and then adds them to a table on form2.[code]then adds a value of 1 to the progress bar (i still am trying to figure out how that works) on form2.

View 3 Replies

Sending Data From VB App To SQL Table

Jun 11, 2011

how to connect and view data in a sql databse table. Does anyone know how to send data from say two textboxes to the table [Code]

View 3 Replies

Sending Data To Access Db?

Apr 7, 2012

i have created a MDI form and i have a child form that collects data and inserts it into access 2010 DB however it does not work .my code is odd and i am trying to use mysql syntax here is the names and opject types used in the sql code

intID = a text field that is autogenerated with a number
txtFirstname.text (text field)
myDOB is a DATE variable which is collected using a date picker (myDOB = dpDOB.Value.ToShortDateString)

same goes for mysubs

SQL

metag

INSERT INTO members (ID, FirstName, surname, DOB, SubsDate, HouseNo, Street, Town)VALUES ('" & intID & "','" & txtFirstName.Text & "','" & txtSurname.Text & "','" & myDOB & "','" & mySubs & "'" & txtHouseNo.Text & "'" & txtStreet.Text & "'" & txtCity.Text

i then get nothing but errors

View 6 Replies

Sending Some Data Over A Networkstream

Jul 31, 2009

I am sending some data over a networkstream. The datasize is 97 The buffersize is 1. Data is a list of bytes. When the bytecount reaches 94 the do while loop exist itself.

[Code]...

View 2 Replies

Access Com Port And Sending Data

Nov 9, 2011

have gps constantly sending data but can read it from the com port

View 5 Replies

Asp.net - Sending VB Data To Another Page In Javascript?

May 28, 2010

I'm creating a search form using an asp:button control with the urlpostback set to a results page. The problem is, the asp:button uses Visual Basic and the search results from Google require Javascript.

Is there a way to take the data from an asp: textbox in VB and then send it to another page that uses Javascript and use the data?

View 3 Replies

BitConverter - Sending Data Across TCP Socket

Apr 9, 2010

Given the following information
Public Enum Request As Byte
None = 0
Identity = 1
License = 2
End Enum
Protected mType As Communication.Request
mType = Communication.Request.Identity
Debug.Print (BitConverter.GetBytes(mType).Length.tostring)
2

Why does bitconverter report that mType is a length of 2. I would have thought that passing a Byte into BitConverter.GetBytes would just return the Byte. I mean it's no big deal because it's only sending a very small block of data across a TCP Socket, but I'm just intrigued why it thinks it's 2 bytes.

View 1 Replies







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