VS 2008 Get Response From Serialport To Update Property?

Feb 19, 2011

There is a problem in my project. It has a class with several properties. When I set the property, it send command to device through serialport. But the problem is when I get the property, it need to send request command to device, and device return value back. How can I update the property?

View 2 Replies


ADVERTISEMENT

Change The .BaudRate Property Of A System.IO.Ports.SerialPort While It's Already Connected?

Nov 18, 2010

For whatever odd reason, we have a legacy data recorder device that runs at 9600 baud. Except when it needs to transfer its recorded data to a PC, in which case it switches to 57600 baud.

The old VB6 code worked, although it had its own set of problems of course.

The routine is this: Do several COMMAND/RESPONSE routines to populate a list of available records, listed by timestamp, at 9600 baud. Once a timestamp or several are selected, display a file save dialog. At the moment that dialog is closed, send a command to the device to tell it "hey we're going to warp", sleep for 100ms, then set the baud rate property of the persistent COM1 connection to 57600, before beginning to process XMODEM data and do the progress bar dance.

The problem I'm having is that it doesn't appear that the data received is ever really kosher as far as the byte marshaling is concerned. Which makes me wonder just how well SerialPort is at dynamically changing bauds on the fly. The VB6 version used MSComm.

I've even attempted to just use MSComm through the compatibility layer but "CTL_E is not supported" which makes it sound like it's incapable of doing XMODEM. (?)

View 1 Replies

Response.ContentLength Property?

Mar 2, 2009

If you run this code, builder.Append("Content length: " & response.ContentLength & _" bytes" & vbCrLf)

it returns a string builder object which shows the number of bytes contained in the page. But the url here must exceed some sort of character limit because it is returning -1 as the value which means (Unknown?)

Dim uri As New Uri("http:raws.wrh.noaa.gov/cgi-bin/roman/raws_ca_monitor.cgi?state=NWCC&rawsflag=2")
Dim builder As New StringBuilder
builder.Append("AbsolutePath: " & uri.AbsolutePath & vbCrLf)
builder.Append("AbsoluteUri: " & uri.AbsoluteUri & vbCrLf)
builder.Append("Host: " & uri.Host & vbCrLf)

[Code...

View 3 Replies

VS 2008 Update Structure In .tag Property?

Mar 29, 2010

I am creating labels at runtime. Inside the .tag property I have a structure. Everytime I attempt to update the structure the .tag property doesn't update.

Here is the structure:

Public Structure structChip
Dim kingStatus As Boolean
Dim currentTileLoc As Integer

[Code]....

View 15 Replies

Get Number Of Rows Inserted Response From Dataadpter.update?

Dec 8, 2010

I am doing a project, uses vb.net as front end, ms sql as back end.my application insert bulk of rows from a datatale to the table in server.it uses dataadpter.update to send all the rows to the server.

View 2 Replies

Javascript - Response Object Not Returning Excel Stream In Update Panel?

Oct 11, 2010

I am generating an Excel file upon a click of a button in an update panel. It is throwing a parsing error.If I keep the button outside the update panel it is working fine. Why isn't it working in the update Panel?

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition",
String.Format("attachment;filename={0}", filename))[code].....

View 1 Replies

VS 2008 PDA SerialPort?

Jun 23, 2010

I have wrote this program (for PDA), to connect a PDA to the PC via RS232.It only works half way.

If I send anything from the pda to the pc, I receive data correctly.If I send anything from the pc, then the pda hangs up.Can anybody tell me what I'm doing wrong?

Also, how do I make sure the port on PDA is closed when quitting the application?

[Code]...

View 1 Replies

VB 2008 On XP Exception With Serialport?

Mar 14, 2009

I am trying to access a printer via the serial port in VB Express 2008. I wrote a small prog with buttons on the form to exercise the escape codes in a Windows Vista 32 laptop with a USB to serial adapter. Only 3 codes worked, BEL, reset and a printer specific command. Also, when i try to receive data, it justs times out. So, I tried to move to a WinXP machine with real serial ports. The program now has an illegal argument exception and the message is to the effect that the name of the port for the property portName does not start with COM/com. Which is very puzzling because I did verify the portname and it is com1.Is this a known issue or am I doing something wrong? The form works on Vista but not in XP.

[Code]...

View 8 Replies

VS 2008 SerialPort Hang-up?

Jun 23, 2010

I am trying to send and receive data using the SerialPort component. I am sending data to an Texas Instruments MSP430 which simply echos the sent character. I wanted my VB solution to read characters from a file, send a single character, and wait until the echoed character is received before sending another.

I have been fairly successful thus far but I have run into a little catch. When I attempt to send large files (323505+ characters) my MSP430 just hangs there and will not receive any more characters. My VB app return to VS '08 with timeout errors (timeout set to 1 minute).

I wanted to post my VB code here to see if the problem is from my VB app. I will be posting this problem on the IT usergroup to sort out anything on the MCU end. Here is the pastbin of the data write and the data receive subs:[URl]..

View 2 Replies

VS 2008 Using Serialport On 2 Different Forms?

Aug 25, 2009

I'm using one form to make contact with the serial port with the next

Imports System.IO.Ports
Imports Microsoft
Public Class Menu

[Code].....

View 2 Replies

VS 2008 - Warning - Serialport.encoding

Jul 7, 2009

My program has been running fine for months and still is, but I now have this warning, (which must have shown up since upgrading to VB2008 from 2005 a month ago).

It regards the serial port encoding setup and reads as follows -- serialport1.Encoding = encoding.GetEncoding(1252) 'for char > 127

Warning 1Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated. Perhaps there was an update on this with 2008 and it's now redundant or something?

View 4 Replies

VS 2008 IO.Serialport Does Not Receive Any Data

Apr 6, 2009

I want to use IO.ports.serialport to receive ASCII data from an instrument (A Luxmeter for those interested). So far, i've been unable to read any single byte from the instrument using the IO.ports.serialport.A terminal window shows the datastream just fine, and I've used MScommlib to read the data without problems. I just had other problems with the latter, so I thought I'd give this IO.ports.serialport a try.The code runs fine, no errors. It just doesn't receive anything.Bytestoread stays 0 forever.I distilled the code to it's bare essence. What am I missing? Is it something obvious, or did I completely misunderstand the whole concept? (Which is not unlikely..)I did check the obvious, of course: settings, baudrate, cable is connected, instrument is sending, etc.[code]

View 6 Replies

[2008] SerialPort Blue Screen?

Jan 22, 2009

I was attempting to clean up my serial port example that is in the code bank. I had decided to use a modem, thinking that a lot of computers still had them. By using the loopback feature of the modem I am able to simulate / emulate various features of the serial port.All was going well, and then I got a Blue Screen with this error after running for 10 minutes or so:DRIVER_IRQL_NOT_LESS_OR_EQUALSTOP 0x000000d1 etc.I then went back to using my GPS receiver, which sends messages constantly to a serial port. This test ran for several hours(4). It received messages correctly during the entire test.I then created a new, not as complex, version and it also receives the Blue Screen. I have made sure that the modem drivers are up to date, searched for the error, etc. My gut is telling me that it is the modem driver. I have attached the project. This is the scaled back version, but it uses the same functionality.

View 7 Replies

VS 2008 Creating Dynamic SerialPort Controls

May 31, 2009

I need to create some serial port controlls manually. My program reads through a config file, and it if comes across an entry called COMPORT then I need to create a contol to talk to this port. The entries in the ini file might be

COMPORT=COM1
COMPORT=COM3
COMPORT=COM7

So here is my problem! I'd like to create the variable control name with part of the com port number, so I can always refer back to it.
EG.

Dim strVar as sring = "COM1"
Dim CName+strVar As New System.IO.Ports.SerialPort

View 1 Replies

VS 2008 SerialPort Custom NewLine Character?

May 21, 2010

I have this sample code...

Private Sub DataReceived( _
ByVal sender As Object, _
ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _

[code]....

this displays in a text box the received data from a serial port. And it works like a charm but the data received has custom start and end of line characters. A line begins with chr(&H2) and ends with chr(&H3). What i want is on the text box those characters to be hidden and the chr(&H3) to start a new line.

View 5 Replies

SerialPort Events Won't Fire On Windows Server 2008 Using .NET 2.0 Application

Jul 9, 2010

I have a program that reads data from a scanner via the serial port.This program works fine on Windows XP.We have a terminal server set up running Windows Server 2008.I run HyperTerminal on our test terminal, it connects and reads the scanner data fine through COM1.I run my app on that same test terminal and get nothing when I scan.My app connects to COM1 without errors and disconnects without errors.BUT, the DataRecieved event is NEVER getting fired.Neither is the ErrorReceived event.I have played with the Handshaking, with the RecievedBytesThreshhold and pretty much every setup setting I found.Set it up exactly like the settings on Hyperterminal.I have even tried starting a timer on a different thread to call ReadByte every second to try to KICK this thing into doing SOMETHING.Nothing has worked.

I have been trying to fix this for an entire day now.Added events to my class trying to see EVERYTHING that is going on. All I know is, it connects to the port and it disconnects from the port correctly but nothing happens in between.No data when I scan.No event fired at all between connecting to and disconnecting from the port.I have also downloaded other's simple serial communications applications.Nothing in .NET works.[code]

View 1 Replies

Setter Value - How To Update Flag Property Of Row

Nov 10, 2009

I've got 2 classes, one called row and one called value. The row class has an array of value as one of its properties. The row class also has a property called flag which will contain an enum for how it has changed. On the setter for value I was hoping to update the flag property of row, but I cant work out how to do it via modern OO. Here's the

Public Class Row
'Variables
Private values_local() As Value
Private flag_local As DataFlags
'Properties
Property values() As Value() .....

View 1 Replies

Update Object Property Placed In The Combobox?

Apr 7, 2010

I am working on a project that uses lots of custom class objects.Before starting work on real project, I tested the object behaviour on a temporary project. And find that if i add the object to a list and combobox and then make any change to the object property then it reflects in list and combobox.But after using the same process in real project the change does not reflect. how can i update object property placed in the combobox.for eg.Class X has property id and name created objX of type Class X and set id=1 and name='All' insert objX to combobox now, in the same form and in other function when i get objX from combobox and change name='None', then it does not reflect in combobox.

View 3 Replies

VS 2008 Api Response Coding?

Aug 10, 2009

I have developed an application for Windows Mobile Devices using Visual Basic 2008. One feature of the application, allows users to view records that are stored online, on the device. The application sends encoded data to an API, which is simply part of a server. The process I am using to send the data to the API is extremely simple. When you press the "Send" button in the application, it pulls the information needed, encodes that information in base64, and then attaches that information to the end of a URL. For example, it would look exactly like this when it was ready to send.

[URL]

The data is then sent out by simply loading it into a webbrowser control. Once the data hits the API, the API Then sends a response back. And this is where my issue is coming into play. The API either sends a message back saying "Pass" or "Fail". If it Fails, It includes and Error Message. If it passes, it includes a "URL" which then has to be opened in a browser or in a webbrowser control.

I need to know: HOW DO I CAPTURE THE RESPONSE THAT THE API IS SENDING BACK. More Specifically, I need to know how to capture the URL that is being sent back from the API, so that I can open it in a webbrowser control.

Now, I feel like I need to be more specific as to what is going on. I am able to send the data to the API, and it is being sent exactly as it needs to be. It has been confirmed on the API side, that the response is being sent back to me. The only problem I am having, is trying to figure out what to do with the response, more specifically, how to view the response period. I'm extremely new to the entire API Deal. Without being able to view the URL That is being sent back, the feature doesn't work of course.

MY CODE I HAVE SO FAR:

Public Function VARRecEncode() As Object
VARRecEncode = p1 & AccessPin
TextBox2.Text = VARRecEncode

[code]....

View 1 Replies

Update Property Of Object In List In ForEach?

Apr 2, 2011

I have a List(Of SomeObject) that I enumerate over using a For Each loop. This SomeObject contains a Property that references another Object, as such

Class SomeObject
Public Property Another As AnotherObject
Get

[Code]....

If not, what is a valid way to do it? (ordinary for loop perhaps?)

View 1 Replies

VS 2008 - Property Grid - Click On Item Show Its Property

Mar 18, 2009

I have a listbox with several list items added. I want that as user click on an item, I should be able to show its property. This should change for different items. For example (hypothetical) : Listbox has numbers 1 - 10. Now when I select 1 I should be able to set property - Name, Lastname, Colour, Age.

When I select 2 I should be able to set - Age, Hair Colour (clr shows), Weight, Date. When I select 3 then - City (combo box drop down), Country, Age only. This way value changes for diff items. One way is to put them in property grid and show them. Though this looks nice but adding/removing items in that is not easy. You need to have a class that refer that to prop grid. Do I have to code for each classes for all values in listbox or is there an easier way to manage items in property grid. If you think prop grid is not the right tool for such an activity then can you suggest something else.

View 13 Replies

VS 2008 Dim Request As WebRequest + Response Url

Mar 24, 2010

I am posting data to my website, i have a Dim request As WebRequest = urlgoeshere After I post, it redirects to another page. How do I pull that url of the redirect?

View 2 Replies

VS 2008 Put Web Response From Textbox To Datagridview?

Aug 16, 2011

how can i put this two response

"<RRN>001D7D3610AA11834PM</RRN><RESP>0</RESP><TID>WB7842584365</TID><BAL>8736.40</BAL><EPIN>PIN1 123456 PIN2 654321</EPIN><ERR>Success</ERR><ERR>
</ERR>

[Code].....

and in row 2 same as row 1. you can see in two response the tid is different and the balance is different,

example to understand this better im developing a web base application
when a retailer sell a product with a quantity of 2, when i hit sell the response are look like in top of this thread and then i get it by tag but this is my problem how can i get this two on the datagridview?

View 5 Replies

VS 2008 Upload File And Get Response

Aug 25, 2009

I am trying to upload a file here. [URL]

Heres the headers I need to use to send. They're from live http headers.

[Code].....

View 2 Replies

VS 2008 - HTTPWebRequest / Response Send XML Data

Jul 29, 2009

This is the short instruction:
1) Make a single HTTP-POST request to the following URL in XML format.
[URL]={password}&user={username}
2) The xml form field that is posted should be named "createorder".
I don't get the last part with naming the xml form field. What the xml form field means (stands for) in this context?

View 3 Replies

VS 2008 Capture Response Or To Be More Specific / URL That Is Being Sent Back From API?

Aug 9, 2009

My application was designed in Visual Basic 08. There is a feature in the application that allows users of the app, to view a "Recording" page from the application, and works with a Soap API. Once the application sends the requested data to the API, the API responds with a custom URL, which must then be opened in a browser.How do I capture the response, or to be more specific, the URL that is being sent back from the API? Below, I have included the full parameters of the api, as well as the code that I have so far. What I really need to do, is figure out how to caputure the URL that is being sent back from the API to a text box. This will allow me to then transfer that text to the browser. But again, I have listed the full specifications, or parameters of the api below, as well as the code that I have so far. In case it helps, the app was designed for Windows Mobile using Visual Basic 08. [code] I am able to send the correct information to the api, but when the api returns the response, with the URL in it, I am unable to obtain that URL, and therefore unable to open that URL in a web browser, which has to be done as you can see from the API specs.

View 18 Replies

VS 2008 Robust Response To Out Of Memory Exception?

Mar 31, 2010

I've noticed that GDI+ and other graphics can crash when asked to deal with very large images, and the crash doesn't always occur where you'd expect it. I am getting this when testing the slide show program I posted to the code bank yesterday. This is the code concerned:

vb.net
Private Sub animTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles animTimer.Tick If infos.Count = 0 Then Exit Su ticks = (ticks + 1)

[code].....

View 14 Replies

[Vb 2008] Auto Login And Read The Response?

Sep 3, 2009

[Vb 2008] Auto Login and read the response?

View 3 Replies

Asp.net - Property Was Not Found On The Entity During An Insert, Update, Or Delete Operation?

Apr 6, 2011

I have a GridView that is tied to an EntityDataSource. Most columns are normal bound columns, but two are itemtemplates. When I attempt a delete on one of the rows I receive the following message:

"A property named 'Building1.building_name' was not found on the entity during an insert, update, or delete operation. Check to ensure that properties specified as binding expressions are available to the data source."

I'm not sure how it is possible that this isn't available, since it displays the element just fine when I'm just viewing - it just throws the error when I attempt deleting a row?

View 1 Replies

VS 2008 Decompress Gzip And Chunked HTTP Response?

Oct 14, 2011

im making a packet sniffer by using Sharppcap library.the problem is unchunking and gunzipping chunked and gzipped HTTP response.here is a example byte array that needs to be unchunked and gunzipped.

[Code]...

View 2 Replies







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