Use COMM Port 2 To Get Information From A Device. .NET Doesn't Support It Though

Feb 9, 2010

I am writing a VB.NET app that has a piece which needs to send a small command to comm port 2 and get the return result. The problem is .NET doesnt have any support for serial communication seems like.

I just need to send the command "headtype" and get the result.

View 2 Replies


ADVERTISEMENT

VB 2003 - Handling Data - Transmitting Data From A Comm Device Via Serial Port

Nov 10, 2009

I'm currently working on a project where I am transmitting data from a comm device via the serial port and resorting the raw data (in binary) to its respective ascii values. The problem I'm facing is determining the most efficient method to accomplish my goal. Essentially, I have 68 bytes coming in, the first and second bytes represent the page and packet number and the data itself ranges from 3 to 64, the remaining for my checksum.

What I am needing to do is, grab 50 consecutive bytes per variable in my array, and that is where I'm confused. I have easily pulled my 3-64 bytes and stored that data to a string. I just don't know the most efficient method to accomplish my goal. Should I write directly to file all my data, as there are like 8 pages, of 128 packet data. [Code] I can capture the the first 50 by using a for-loop easily, but what would be the preferred method to track what data chunk I've taken? The more I think about it, I think I may just want to write to file, all my data, and then just take them back to back in 50 byte chunks. Is that the most efficient method?

View 3 Replies

VS 2005 Read Information From A Device Through COM Port

Sep 27, 2010

I'm trying to read information from a device through COM Port.. Sometimes I receive information like:

[Code]...

how I can change that? or detect it so whenever the program receives that type of info it ignores it?

View 2 Replies

USB To Parallel Printer(CEN36) - Doesn't Appear As LPT Port Device

Jan 26, 2012

I'd try programming in vb.net with a usb to parallel printer but it doesn't appear as LPT Port Device. It show as a USB Printer Support in USB Controller. Just to receive and send a bit in different pin to be in servo controller/driver.

View 4 Replies

Comm Port And HEX Data

Jan 27, 2010

Basically I need to send the hex command FA through a COM port.

I have added the com port and set the baud etc and all seems to be working well there. I am just a little unsure how to send the correct hexadecimal command. For example,

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

[Code].....

View 4 Replies

Create A Logical Comm Port

Apr 29, 2011

Is it possible to create a logical serical port in vb that another application can open and read/write to?

View 2 Replies

Hooking The Comm Port (RS232)?

Nov 2, 2011

I currently have software that sends out plain text(i.e. 'X') to comm 1 port and was wondering if there was any way to capture that plain text and also respond to that port on the same compute as the port without having anything plugged into the machine (i.e. 9 pin serial cable). I am trying to avoid buy any more hardware as this is an objective to acutally cut down on hardware.

View 1 Replies

Serial Port :: Ms Comm Getting Exception?

Nov 27, 2011

I used microsoft com control 6.0 in the application for sending data to the led control

MSComm1.EOFEnable = True
MSComm1.SThreshold = 100
MSComm1.InputLen = 0

[code].....

View 1 Replies

Proper Syntax For Comm Port Comunication

Dec 31, 2009

Now I know whats going to happen, I will post a request for code syntax and one of the admins is going to say that I need to post the code I already have. The code I already have is irrelevant to what i wish to do. So, continuing on; I have a micro controller that i wish to send commands to it in HEX data type. Communication is via the serial port RS232. (well technically its through the USB to serial converter)Steps:

1) Sending a "001" tells the micro controller to await instructions as to what to set the duty cycle to

2) The data that follows i.e." 050, 010, 185 " will be added to 400 (by the micro controller) to come up with a duty cycle based on a 10 bit resolution of 0-1024. I am only going to be using the range of 401- ~500.

I can communicate with the micro controller via hyper terminal. Using the Alt + #keys method I can transmit data to the micro controller, and this is what i with to do with vb.net.[code]

View 4 Replies

Read / Write To A COMM Port From An ASP.NET Page?

Feb 22, 2007

I have an older VB6 application which uses a scanner on the COMM port and does the following... (I have been tasked with re-writing it in ASP.NET (VB)...

OLD APPLICATION...

1. reads a Scanner and loads the data onto the PC

2. FTP's the data file to a SQL Server (where a small app picks it up and processes it)

3. Deletes the data from the scanner[code]...

View 6 Replies

[2005] UnauthorizedAccessException Accessing Comm Port

May 3, 2006

I'm debugging a VB app where I'm using a comm port attached to a bluetooth radio paired to another bluetooth radio in order to communicate with a remote barcode scanner. The pair of bluetoooth devices basically work as a serial cable replacement. Sometimes it works fine, but after a while I get an UnauthorizedAccessException message which breaks the program (see attached jpeg).

I only get this when I use the radios and not when I use a direct cable. I wonder if it has something to do with other bluetooth devices nearby trying to communicate with mine. I've used the .NET Framework 2.0 Confuration tool to adjust the zone security to give full trust to MyComputer, so I don't think it has to do with security, but I'm really going beyond my area of expertise here. I don't know what's going on.

[Code]...

View 2 Replies

Error Compiling Code For Working With A Comm Port

Apr 8, 2010

I did a search for "How do I implement Serial COM Port communications? and found a response by Xiaoyun Li which was last posted on April 10, 2009. Xiaoyun's response included sample code. My intent has been to get a clean compile on the sample code, then test it, then expand the code into a real application. I am down to a single error message, which I can't figure out how to resolve: "Method 'Public Sub DoUpdate()' does not have a signature compatible with delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'." [code]I marked where the error occurs in the code with *** to the right of the error line.The code is attached to a simple form, Form1 which contains a single text box, TextBox1.It appears to me that the code needs a Delegate statement, but I can't figure out how to code it or where to put it.d.

View 3 Replies

Getting Scale Values From A Comm Port Into A Richtextbox Control?

Apr 13, 2012

I am getting scale values from a comm port into a richtextbox control, now as long as the connections and the scale is working great scale readings continuously flow into the control all the time, however when the connections or the scale is turned of the label that displays the weight will give a message saying error.

After 5 seconds I want to be able to give the operator the choice to take scale readings manually. This is my code so far.

Private Sub tmScaleTimer_Tick(sender As System.Object, e As System.EventArgs) Handles tmScaleTimer.Tick
If rtbDisplay.Text.Length = i Then

[Code].....

how do I restart the timer if the interval has elapsed

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

Catching And Removing Escape Characters In A Serial Comm Port Program?

May 18, 2010

I have recently developed a serial port communication program to access my hardware firewall and its connected to the device via a converter usb to rs232head plugged to a rs232 to an ethernet cable. this ethernet cable then plugs into the device console port.

my program functions similar to that of TeraTerm. an opensource hyperterminal program written in C++ but i decided to do one for vb.net

Alright to cut the story short, i have successfully coded out the program to accept incomming data from the device but however, i'm also receiving ansi escape sequence along with it and i have no idea how i could implement codes to remove these. i have spend 3 weeks trying to look for vt100 emulation codes written in vb.net but i found none so far. most are written in c++. here's an image to illustrate the problem which im facing.

The image below is a screenshot taken when the i ran both the programs together. The bottom is tera term 3.1 and the top is my vb project which i made using msdn's example and improved on the codes. basically tera term was able to interpret those escape sequence and display accordingly to that of the vt100 terminal display. I have spent time reading on regular expressions using the inbuilt function regex in visual basic and tried parsing some strings but its not working. i guess its far more complex than i thought.

View 6 Replies

Comm Port Read Hangs When Attempting To Read Data?

Apr 18, 2010

I;m attempting to write code to read several NMEA ports and format the data for archive. When I execute the following code:

Using Commportno As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort(portName:=port)
Dim Incoming As String = Commportno.ReadLine()

View 5 Replies

Connect To A Device Through A USB Port

Nov 5, 2009

How do I connect to a device through a USB port. Saying I know what the device ID is. I want to open up serialized communication between me and the device.

View 3 Replies

Pointers To Variable - Vb Doesn't Support But C# Does

Jan 17, 2010

Since vb doesnt support pointers but c# does. I am using a wrapper dll that requires a pointer to some singles to be passed within the method. I get an error that the method has some parameter types that are not supported. How can i pass a pointer to this method if vb .net doesnt support pointers.

View 4 Replies

Why Expressions Doesn't Support IdentityEquality

Sep 22, 2009

There is no IdentityEqual item in ExpressionType enumeration. How can I construct expreesion tree with VB.NET Is operator?

View 1 Replies

Communicating To A Device Using A USB To Serial Port (VCP)?

Feb 19, 2010

I am communicating to a device using a USB to serial port (VCP). I am having a problem with the usb failing. When the usb fails my app will lock up and the com port is lost. I have seen a post about this but cannot find it.

View 3 Replies

Read XML From A Device Through A Serial Port?

May 13, 2011

My current program can read in a continuous stream of data when initialized and I can send a command to retrieve the devices stored data, I also have within the same program code that will read an XML file and populate from controls.

I have two separate idea's right now that I'm trying to merge into one

I want to read in XML and populate my controls. I'm aware of delegate and Invoke but I'm having a hard time working them into my XML portion or the opposite "working my XML into my serial port class".

View 14 Replies

[2005] Accessing Device On USB Port?

Nov 10, 2008

I have been doing some research into accessing devices on a USB port and it's kind of helped, but not really. From what I understand, I can use the IO.Port namespace to access a device on a USB port (usually). Let me know if this is incorrect.

First, I made a simple program that looped through the ports available. I get COM1 and COM3, but I have 4 USB ports. Where are the others?

My
Dim comm As New List(Of IO.Ports.SerialPort) 'list of comm ports
For Each PNstr As String In IO.Ports.SerialPort.GetPortNames() 'get a list of Com Port Names

[Code].....

View 13 Replies

.net Datatable Doesn't Support Datatype From DateDiff

May 9, 2011

I have a query to retrieve DateDiff in my SQL:

SELECT Convert(char,DATEDIFF(m, Temp.Opening_Date, '2011-05-01')) As MonthDifference From Temp

It was successfully retrieve the data from SQL Server. But when I bind it to my vb.net datatable, the value is null. It's seems like vb.net datatable doesn't support datatype from DateDiff... What can I do?

View 1 Replies

Doesn't C# Have Support For First Pass Exception Filtering?

Mar 2, 2009

Note: this is not a duplicate of Jeff's question. That question asked "Is an equivalent?" I know there isn't, and I want to know why! The reason I ask is that I've only just become clear on how important it is, and the conclusion seems very strange to me. The Exception Handling block of Microsoft's Enterprise Library advises us to use this pattern:

[Code]...

The policy is defined in an XML file, so that means that if a customer has an issue, we can modify the policy to assist with tracking down (or perhaps papering over) the problem to give them a fast resolution until we deal with it properly - which may involve arguing with 3rd parties, about whose fault it all is. This is basically an acknowledgement of the simple fact that in real applications the number of exception types and their "recoverability" status is practically impossible to manage without a facility like this.

Meanwhile, the CLR team at MS says this is not an option, and it turns out those guys know what they're talking about! The problem is that right before the catch block runs, any finally blocks nested inside the try block will be executed. So those finally blocks may do any of the following: Harmlessly modify the program state (phew, lucky). Trash something important in the customer's data, because the program state is screwed up to an unknown degree. Disguise or destroy important evidence that we need to diagnose an issue - especially if we're talking about calls into native code. Throw another exception, adding to the general confusion and misery.

Note that the using statement and C++/CLI destructors are built on try/finally, so they're affected too. So clearly the catch/throw pattern for filtering exceptions is no good. What is actually needed is a way to filter exceptions, via a policy, without actually catching them and so triggering the execution of finally blocks, unless we find a policy that tells us the exception is safe to recover from. The CLR team blogged about this recently:

[Code]....

View 6 Replies

Object Doesn't Support This Property Or Method?

Feb 9, 2012

Are shared properties accessible from a COM exposed .NET assembly?

Dim appExcel As Object
Dim objAppSingleton As Object
Set objAppSingleton = CreateObject("Pitchbook.CommonUtils.Application.PitchbookAppSingleton")[code].....

The line appExcel = objAppSingleton.CurrentPitchbookExcelApp gives the error:Run-time error '438': Object doesn't support this property or method

View 2 Replies

App To View Which COM Port A USB-Serial Device Is Connected To?

Jul 14, 2011

I am currently having an issue finding information on how to develop a simple application that a user can run to find out which COM port ie. COM1, COM2, ect is assined to the Belkin USB to Serial Adapters we use in the company.

To anyones knowledge is this possible and how would I implement it in a Windows Form Application.

View 15 Replies

ASP.NET Webpage To Device Connect To Server's USB (COM) Port

May 19, 2009

I am working on a way to send commands to an Arduino board from a web site. The Arduino board is connected to the computer via a USB port (a COM port).

I have managed to connect and control the board using a VB.NET program. I also wrote a VB.NET class that can instantiate a COM connection and send and receive messages.

My next step is to basically create a program that will act as a proxy between my web server (IIS 7 running on Windows Vista) and the Arduino board. When a user gets to my ASP.NET page, the page will then send a command to the proxy to open the COM connection. When the connection is open and ready then I can send commands to the proxy. In turn, the proxy will send these commands to the board and listen for the responses it receives from the board. The proxy will then pass these messages back to the ASP.NET page.

The main issue I see occurring is that if a second user opens the web page and tries to open the COM port, there will be an error. Will this cause the first connection to fail? I guess I can first check if the port is already in use and give the second user a message. Are there any other potential challenges I am missing or not seeing?

View 1 Replies

Connect To External Device Using A Serial Port

May 25, 2010

I'm trying to connect to an external device using a serial port. I found a couple of tutorials with demo code and tried these. Unfortunately they all return the same gibberish unreadible result.[code]I'm sure my port settings are correct (I have the communication protocol of the device.)

View 20 Replies

How To Show All Available Serial Port In Device Manager

Jul 24, 2011

I have a windows form in vb.net. in my form have a combobox. I want in combo box show only all com ports that exist and available in device manager. How to do it?

View 5 Replies

IDE :: Why Doesn't In Visual Studio 2010 Have Any Refactor Support

Jul 3, 2009

Why doesn't vb.net in Visual Studio 2010 have any Refactor support

View 14 Replies







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