Communications :: Serial Port - Run Program, "Access To The Port 'COM1' Is Denied"?

Oct 15, 2008

Im having problem with the Serial Port. When i run my program, "Access to the port 'COM1' is denied". What does that mean? Im not sure whats happening because theres no error in my code. Someone suggest me to use 'COM2'. Which is also the same result. I have a microcontroller, programmed and run it. And i need to capture the data onto my vb, which is on a multiline textbox. How to i do that?Just to double check my code?

[code]...

View 1 Replies


ADVERTISEMENT

.net, Read 8 Bit Data From Serial Com1 Port?

Jun 25, 2010

I am trying to read data from serial com1 port. Now, I am not sure how to send. I found so many method to send but that are not so good and I cann't read any data. I am using VB.net 2005. Which is the best way and how can I read and send?

View 1 Replies

COM1 Serial Port On Thin Client

Apr 19, 2011

I'm currently developing an application on Visual Basic (2010) which requires the use of a Thin Client's serial port. I have already activated the port mapping, and tested the communication (successfully) with PuTTY. How ever when trying to use my software y receive a message The selected port name is invalid, or it is not a serial port.I have already made some successful tests with a common PC with positive results.

View 6 Replies

Read All Data From Serial Port (Com1 / RS232)

Nov 2, 2009

I am trying to make a program in vb 2005 to real all the data from a device connected on Serial Port (Com 1).i did this: [code]and this is how i want to reciveit.when i lounch the program i only receive first line "410001+00000001" and after that i get on the device rs232 error.

View 6 Replies

Communications :: Like A Serial Port

Mar 8, 2010

For many years, I have sent data between 2 computers using serial ports."Here is the data", "Thank you for that data!" type stuff.Where do I get more information for doing the same thing with 2 computers that are networked together? Assume a local ethernet connection.I have experimented with serial-ethernet modems and that works well but I don't want any more hardware.Is there a good thread here I should read?I want 2 VB programs running and I want to exchange data periodically.

View 2 Replies

Program Button To Access Serial Port

Nov 20, 2011

I have very limited knowledge of any programming and am desperately trying to learn. I am attempting to use Visual Basic to create a simple program to operate our church's projector from the computer. I am able to control the projector using hyperterminal and accessing the serial port. I am wondering how I would code a button to send the correct signal to the correct port? I have a simple setup w/ my church logo in background with three buttons. There is an On, Off and Freeze button. I am simply needing to know how to program the buttons to access the serial ports. I hope I am being clear.

View 2 Replies

Communications :: Listening To The Serial Port?

Sep 21, 2011

I am trying to listen to the COM3 port and display the output in the TextBox. If I understood correctly I will have to implement this by using eventhandlers, delegates. I tried following these articles:

[URL]

And this is the code I came up with... Unfortunately it doesn't display anything. App just starts display "True" and no data is being displayed. I am monitoring Arduino platform which I know is sending data constantly.

Code:
Imports System.IO.Ports
Imports System.Text
Public Class ArduinoSerial

[code].....

I am really new into the vb.net. I am sure there are some horrible mistakes with this code but I am kind of stuck for the past 2 days on this one.

View 5 Replies

Communications :: Reading From Serial Port?

Dec 16, 2008

i am using serial communication to read from a plc.The plc will send a string :&H3A as a header byte then C(which is a variable that contains data)I want to read and mask out the header byte.I use the following code but cannot read anything.

Private Sub btnread_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnread.Click
Msg = SerialPort1.ReadExisting
count = Val(Mid(Msg, 1, 2))
Lblno.Text = count

[Code]...

View 1 Replies

Communications :: Disable Encoding For Serial Port?

Apr 1, 2009

I am trying to transmit the integer value 360 to serial port. but at micro controller i am getting the 3 bytes (33 36 30) its ASCII Values.So is there any way to transmit the 360's hex value 168 using two bytes only like 01 68 only?

View 2 Replies

Communications :: Receive Hex Data On Serial Port?

Jan 5, 2009

I am trying to recieve HEX data from a seriall device. Code is as below . but the required output is not correct. Some chracter code are not correct even in decimal. like for 80 i recieved 3F and for c0 also. for example i recived a string .

10 02 3F 00 10 03 3F 61

but in actual data should be

10 02 80 00 10 03 c0 61

Public Sub DataSeriallReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort.DataReceived
Dim buff As String

[Code].....

View 2 Replies

Communications :: Receive Text From Serial Port

Apr 23, 2008

I'm trying to receive data from the serial port and display onto a text box in my gui in vb. I'm using xp pro sp2 and vb 2008 exp.What i've done so far:

- I'm able to send data successfully (tested) to the serial port
- I can dispaly what data is being sent (tested)

Steps taken:

- I have looked around on this forum for something similar to what I have but no similar posts are here
- Will look into MSDN help shortly
- Will also try some vb books I have lying around. But the problem is most of the vb books deal with sql server and database stuff and not really interfacing to hardware.

View 1 Replies

Communications :: Serial Port Responding Slow

Sep 22, 2008

i have an application where i send data(a question in a "packet" of 8 digits) to an external controller via serial port, and then that controller sends me back some information(the answer, in a "packet" of 8 digits, not necesarily zeros and ones)I have develope a simply software that is getting the correct data form the controller, here it goes:[code]So now i can see how many times the code needs to enter the loop to get the "answer" from the module.Now i know that the code needs to do the loop from 5000 to 18000 times to get the answer each time!!!!, so that is why the software keeps getting freeze.I supose that that time is neccesary for the module to give the answer, so i think i can't get better respond times, but i would like the software not to get halt.

View 3 Replies

Communications :: Setup A Virtual Serial Port

Jul 4, 2008

I'm writing an app with takes 3 readings off LCD displays via serial ports. The module which scans the serial ports is getting stuck in a loop for around 1.5 seconds. I need it to be much quicker than that. Is there a way I can setup a virtual serial port so I can run test it on my PC. Its very tedious and time consuming of making changes and visiting the machine its for.

View 1 Replies

Communications :: Transfer Image Through Serial Port?

Feb 9, 2011

I have a barcode scanner that beside scanning the barcode it also snaps an image. I wrote a simple application that searching all ports locating in which one the scanner is connected and opening the port.

I can easily read any barcode and the send command to the scanner to pass me the image taken on the port, but i have a problem re-constructing the image from the bytes i read.

Code:
sendCommand()
Dim img(SP.BytesToRead) As Byte
SP.Read(img, 0, img.Length)

[Code]....

I can get the image from the scanner in any format needed (jpg,bmp etc) so no need to provide a precise solution just a general idea.

View 15 Replies

PC Communications To Intelligent Instrument With 485 Serial Port

May 7, 2011

Now I'm doing a VB project about pc communications to a intelligent instrument with 485 serial port. I want to use API but I'm not good at it.

View 2 Replies

Serial Port Communications: Turning Of ECHO?

Feb 16, 2011

During Serial communications, is the echoing back usually done by the serial port interface or is it done by the UART at the far end?

View 10 Replies

Communications :: Arduino Board: Communicate With It Using Serial Port

Jan 27, 2011

I have a problem with something.I have a Arduino board I wan't to communicate with by serialport.
In "Form1", I'll retrieve values from the Arduino board, and I want it to calculate and display data in TextBoxes.How can I do this?[code...]

View 8 Replies

Communications :: Close Serial Port After USB Device Unplugged?

Oct 1, 2009

There seems to be a lot of discussion around about handling exeptions when a USB serial port device gets unplugged. What I want to know is how can one re-attach to it once it is plugged back in. The problem is that if you unplug a USB serial port device the app doesn't know it has gone and remains convinced it is still open. I have to close the app completely before I can re-attach to the device. I need a way to force it to close/go away.

View 2 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

Communications :: Serial Port Input For Barcode Scanner?

Nov 11, 2008

i need to create an application where input are to be received by the barcode scanner.However, i am not suppose to use the textbox to do so. However i need to use the serial port to do so. Any one know how am i able to do that?

View 1 Replies

Communications :: Serial Port Communication Via Null Modem Cable?

Sep 4, 2009

I have a VB.net app running on one computer, displaying text into 2 texboxes or labels.I need to see the two values in two sperate textboxes or labels from the two labels on another computer via a null modem serial adapter.

1st computer.

Code:

serialport1.writeline(label1.txt)

straight forward right?

2nd computer to read the data

Code:
Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
dim s as new string = serialport1.readline()
label1.text = s

This is what I was thinking;

Code:
serialport.writeline(label1.text & label2.text

This would send the two values over the serial port. How would I seperate the two values and display them in two different texboxes?cannot use them together)Am I on the right path at all? Or using the serialport.writeline method won't work at all....

View 4 Replies

Communications :: Serial Port Read Wrong Return Result?

Dec 17, 2008

Anyone else have an issue using read, It appears when I use read it gives me the correct buys but returns the wrong integer value So I use it and it fills the Array i make with &h10, &h6 but read reutnrs number of bytes returned to 1. if there a better way to go with Vb.net with RS232 I mean really my projet dosent have anything out of the Normal

Friend WithEvents CashValidator As System.IO.Ports.SerialPort = New System.IO.Ports.SerialPort("COM1", 9600, IO.Ports.Parity.Even, 8, IO.Ports.StopBits.One)
CashValidator.Read(MyResponce, MyResponceLen, 4)

View 2 Replies

Communications :: Unable To 'activate' Serial Port Like Putty Or Hyperterm

Aug 18, 2009

I'm trying to write a bit of code to communicate with an RS232 coin mech.The problem i have is that the coin mech works fine when used with Putty or Hyperterm but i do not appear to be able to 'activate' the serial port with my code.[code...]

When i open the hypertem or putty session the coinmech's active light immediatly comes on and i am able to send and recieve data. When the port is opened with the code nothing happens.

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

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

Communications :: .net MSComm Port USB 4 Port Relay?

Oct 20, 2011

I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay

"01+//" - Relay 1 is switched ON
"01-//" - Relay 1 is switched OFF
"02+//" - Relay 2 is switched ON
"02-//" - Relay 2 is switched OFF

[code].....

So i am confused as to how to separate each relay out with that code above and just be able to turn on any number 1-4 relay on or off independently from each other!

View 1 Replies

Read The Data From Barcode Weight Scales By Serial Port And TcpIp Port?

Nov 27, 2010

I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port

View 7 Replies

Get FullName From Available Serial Port (Com Port) From Device Manager In Windows Form With .net?

Jul 25, 2011

I have a Windows form.in windows form have a combo box that give me a list of available port serial with it code (Dim ports As String() =SerialPort.GetPortNames())for example( Com1,Com8,Com15,...).but I want to give me fullname of serial port in device manager for example in dvice manager is these (Comunication Port(COM1) - Printer Port(LPT1) And USB Serial Port(COM8)).how to Get it?

View 2 Replies

The Given Port Name Does Not Start With COM/com Or Does Not Resolve To A Valid Serial Port?

Aug 2, 2011

If I uninstall the COM1 and reboot, it works. If I shut down (power off) and restart, I get the message below. If I uninstall then click on Scan for Hardware Changes,The given port name does not start with COM/com or does not resolve to a valid serial port. Parameter name:portName

View 8 Replies







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