Access A Serial And Parallel Ports?

Dec 20, 2010

is there any other way to access a serial port using visual basic.net 2010? i followed the steps in this site, How to access serial and parallel ports by using Visual Basic .NET but i just got this output Open the serial port. Send the attention command to the modem. Wait for data to come back to the serial port...

[Code]...

View 2 Replies


ADVERTISEMENT

Communication With Serial And TCP / IP Ports

Feb 19, 2009

What is the best way of communicating with Serial ports and TCP/IP communcation using vb.net?Using visual studio .net can we make it easier?? Can anyone send me sample application of communications?If I write a program communicating with my hardware using Searial port or TCP/IP, will the program be slow?? Are there any programming techniques working with communication ports?

View 1 Replies

Make An Array Of Serial Ports In Vb?

Jun 6, 2011

I'm fairly new to Visual Basic (VB), but I've already got running code to access all my serial port. The problem is I want to load multiple serial ports into an array and loop through them in my functions. The program allows me to create ports(), but fails when I try to populate it.

Dim ports As IO.Ports.SerialPorts()
ports(0) = SerialPort1

Where SerialPort1 is an object I draged from the Visual Studio toolbox.

View 2 Replies

Using Serial Ports With The New Port Class?

Apr 24, 2010

I'm learning the serial port programming. So, I study the code samples from MSDN - VB101SamplesBCL2 http:[url].....While ran the solution of "UsingTheSerialPort", It shows error: It highlights one sentence textBox2.Text = SerialPort1.ReadLine() -- Line 40 ,and says :

"InvalidOperationException was unhandled - Cross-thread operation not valid: Control 'textBox2' accessed from a thread other than the thread it was created on."

View 1 Replies

Open Two Or More Serial Ports In One VB 2008 Program?

Apr 20, 2009

able to open and utilize a single serial port within with my VB 2008 program (i.e., set port parameters, open&close port, send&receive data via port, etc.), but I want to open two or more serial ports concurrently within my VB 2008 program so that I can read data from one port, say COM1, make decisions and calculations based on that data, and send instructions out through another port, say COM2.

View 1 Replies

Read Data From Two Serial Ports At Same Time?

Aug 8, 2009

I am still new in programming. I am an electrical engineer. I have to read the time from GPS from one serial port apend this time to a data got from other device serially.

View 1 Replies

Sending Multiple Commands To A Serial Ports?

Aug 24, 2010

I am creating an application to configure some modems through the serial port. I have no problem sending a single string of data to the serial port and displaying the immediate response to a rich text box. I have 2 problems

1st: how to update the rich text box for any delayed response from the modem

2nd: how to react to the response from the modem, in other words I want to send the next command based on the response from the modem witch is usually "OK"

This is what my code looks like currently to send ans receive data from the serial port. (sport1 is my serial port and display is my rich text box)

sPort1.Write("AT+WOPEN=1" + Environment.NewLine)
With Display
.AppendText(sPort1.ReadExisting())

[Code].....

View 1 Replies

Update Combobox When Available Serial Ports Change

Dec 17, 2010

I want to know if there is a way to refresh a combo box when a new serial port becomes available.[code]

View 2 Replies

VS 2005 Use MSCOMM For Monitoring Serial Ports For Voltage Change?

Jul 22, 2009

I'm wondering how I could monitor a serial port for a voltage change or contact closure and have an event triggered when there is a detection.

View 1 Replies

Interface Spi Using Parallel Or Serial Port?

Dec 29, 2010

i need to interface an spi analog switches using either a parallel or serial port. Is this possible?

View 1 Replies

Using Serial Ports - Take The Communication From The Software And Redistribute It To THREE Eurotherm 3216 Controllers?

Sep 7, 2009

I'm reasonably proficient with VB but never had any expirence with communicating with hardware. I have a piece of software that communicates with a Eurotherm 3216 process controller via RS232, but its use is fairly restricted what it can do.What I want to be able to do is take the communication from the software and redistribute it to THREE Eurotherm 3216 controllers, so my software would intercept the comms and effectively emulate the Eurotherm.

View 5 Replies

VS 2008 Create An Array Of Serial Ports - Deleting Dynamic Object

Jun 29, 2009

I have the following code to create an array of serial ports.

[Code]...

View 5 Replies

Write A Code For Serial Ports Without Sucess But The Code Does Not Throw An Error ?

Feb 20, 2011

what is wrong with my code and I get no feedback from my button click event, i have imported. ( code Below) and i have tied differrent combinations of the code without sucess.maybe add extra to my code for the list to show open Port or closed ports.

Imports System.Management
Imports System.Management.ManagementObjectSearcher
Imports System.Management.ManagementNamedValueCollection[code].....

View 9 Replies

Check On Serial Ports Is "breaking" USB Modem?

May 31, 2011

I am using the following code to enumerate through com ports to determine if the attached modems are in use.When I get to my usb modem, it returns the correct "PostIsAvailable" status, but then it kind of locks up the modem and I get the following error when I try to manually query the modem I get: "The modem failed to respond. Make sure it is properly connected and turned on. If it is an internal modem, or is connected, verify that the interupt for the port is properly set."I either have to manually requery the modem or unplug/plug it again.This code works fine on my external serial modem, but not the USB modem.

Public Function PortIsAvailable(ByVal port As String) As Boolean
Dim TempPort As New SerialPort
TempPort.PortName = port [code]......

View 5 Replies

VS 2008 - Get The Caption Property Of Serial Ports Available On Computer - Error "A First Chance Exception Of Type 'System.InvalidCastException"

Nov 12, 2009

In my project I'm trying to get the caption property of serial ports available on computer. But when I run this code below I get "A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll" exception. I tried putting "Option Strict On" and then I'm getting build error saying it disallows Late binding.

[Code]...

View 5 Replies

Troubleshooting Parallel Access To Excel?

Jul 20, 2010

I need to save data in excel workbooks. For that purpose, I call excel, open dozens of workbooks, and save them to disk.Nonetheless, the process is painfully slow, and most cores remain nonworking, so I decided to start many threads, to do it faster, and report progress on a progressbar.

But for some reason, it does not work. Excel hangs and the application breaks, without Visual Studio debugger taking notice.I don't know what is going wrong, or how to debug it.

[Code]...

View 2 Replies

Parallel.For Termination - Service That Scans Network Folders Using A Parallel.for Method

Jan 16, 2012

I have a service that scans network folders using a parallel.for method. However recently I am finding if I stop the service then while windows says the service is stopped the process is still running in task manager. However it is at 0 cpu and the memory does not change. If I try and end the task (even a force in command prompt) it just says access denied and i have to reboot the server. What would be the best way to make sure everything terminates? I thought of adding a global Boolean that in the stop procedure it turns true and part of my parallel code will check for that and call s.stop.

View 1 Replies

Load The Available Serial Ports - Load Their Names As Seen In The "device Manager"?

Oct 23, 2010

i am using the below code in VB.Net to load the available serial ports :

COMsComboBox.Items.Clear()
Dim i As Integer
For i = 1 To My.Computer.Ports.SerialPortNames.Count
COMsComboBox.Items.Add(My.Computer.Ports.SerialPor tNames(i - 1))
Next

i also want to load their names as seen in the "device manager",

View 1 Replies

Access Serial Port In 2008?

May 25, 2008

[Code]...

m really not sure in here because this code is for vb .net 2003.. are they the same?

View 2 Replies

C++ - Access CPUIDs (cpu Serial Numbers) Without Using WMI Using C#?

Feb 16, 2011

Possible Duplicate: x86/x64 CPUID in C# I need to retrieve CPU's serial numbers. When using WMI, it is called CPUID.My goal is to access that information WITHOUT using WMI. Unmanaged is code is fine?

View 2 Replies

Automatically Serial Number Generation In Ms Access

Jun 21, 2010

Like below quotes for serial no. for VB.net, do you have codes for ms access? [code]

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

VS 2010 Cross Thread Access Of Serial Port

Mar 29, 2012

In my project I'm trying to send data to Serial port. I have added the serial port control to the form. Now if I try to send data to serial port using Serialport1.write method in a button click event, I'm able to send the data successfully to the serial port. Otherwise if I try to send the data using the same "Write" method from another thread other than the one in which the serial port component was created, I'm getting an exception saying serial port busy.

View 1 Replies

VS 2010 - Reading Data From Serial Port And Outputting To Screen And Access Db?

May 1, 2011

I have conquered the problem of the database however what i need is the serial port data sent to a database and outputted on screen however i keep getting cross thread errors ..

Imports System.Data.OleDb
Imports System
Imports System.ComponentModel
Imports System.Threading

[code]....

View 3 Replies

VS 2008 Application To Reject Serial And Count How Many Times Entered In A Wrong Serial

May 16, 2009

I made my program and now I just need to add in the serial and trial part of the application. I know the application must connect to the host and go to a txtfile. How would i do the trial and serial. Also If the serial is already activated I want the application to reject that Serial and Count how many times they entered in a wrong serial.

View 2 Replies

Unable To Close Serial Port After USB / Serial Converter Disconnected

Mar 28, 2006

I have a stand alone VB.Net 2005 application that uses a serial port that generally stays open while the application runs on a Windows XP system. In trying to bullet-proof the UI, I ran into a problem when the USB to Serial Converter normally used to provide the serial port is disconnected while the serial port is open. In trying to handle the resulting error when accessing the port, I find I cannot close the port.

When trying to do so, the error message says something like "unable to close the port. You may not have sufficient permissions." Reconnecting the USB/Serial Converter does not reactivate the port.

[Code]...

View 8 Replies

Code For Checking The Serial Serial Number Of A Usb Stick?

Nov 21, 2011

With this code i check the serial serialnumber of a usb stick.

[code]...

It is not perfect because the programma crash when there is no usb in de PC.But how do i search fot the sctick if it has a name , for example PPH ? And not G: , because it is everytime a different station.

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

Add Available COM Ports To Select From?

Jul 21, 2008

I'm working on a project and would like to know how i can add the list of avabilable serial ports to the combobox[code]...

View 5 Replies

Can Get Ports Name Listed In PC?

Feb 21, 2012

Anyone here has an idea where I can get the ports name listed in my PC? [code]I could get COM26 and etc. if any, but that's not what I want. Instead of retrieving COM26, I want USB-SERIAL CH340 or USB-SERIAL CH340 (COM26). How could I do that?

View 3 Replies







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