Working With SerialPort Control?

Nov 9, 2009

output.gif?I've just upgraded to Visual Studio 2008 and have been given a project and getting gps string from a radio via the serial port. I used a program called "SerialWatcher" and it monitors the data coming in from the radio. It works perfectly. When I tell it the port and settings, click Open, I get consistent output. Here is an example of the data that I got:

<NUL><STX>$PKLDS,124043,A,3337.8562,N,08418.8077,W,000.0,146.5,091109,,00,101,2190,80,00,*1C<CR><LF><ETX><STX>$PKLDS,124104,A,3357.1421,N,08403.0604,W,000.0,000.0,091109,3.0,W00,101,3003,80,00,*61<CR><LF><ETX><STX>$PKLDS,124128,A,3354.1213,N,08414.3434,W,000.1,274.3,091109,4.9,W00,101,2576,80,00,*64<CR><LF><ETX>

[code].....

The little icon symbol before the dollar sign is actually two symbols which I think are the <stx> and <etx>. I'm including a screenshot to show what they actually look like. From the output my program created all I would need is actually the last line. I can't really check for "length" because some data received by the radio will be half that length (or more than half). But there should always be a start and end (regardless of what is in the middle) I would think.

View 2 Replies


ADVERTISEMENT

Bug In Serialport Control When Using E - 8 - 2 Parameters?

Jun 16, 2011

We have been debugging a problem with serial communications with an embedded device on 115200 baud, Even parity, 8 databits and 2 stopbits. The problem: a lot of extra 0x00 are sometimes received from the serialport.

1) We build a real basic sample program that only handles the data exchange. It was completely build according the serial-port-vb.doc from msdn. It was build in vb.net 2010. So this was the most basic setup possible on the PC side. This simple tool clearly shows the datareceived event spitting out extra bytes.

2) We used a scope to look at the hardware bits/levels. No problems / differences seen between good and bad messages. No extra bytes visible that the serialport event send to our programm.

3) We tapped the serial communication and received no wrong data on the tapping system but still on the .net tool. Again the serialport datareceived event gave us many extra 0x00 bytes.

So our only possible conclusion is that there is a problem in the serialport component from .net. My question: Are there any know issues? Can I get in contact with a microsoft engineer?

View 9 Replies

VS 2005 SerialPort Control

Aug 21, 2009

I'm working on application which uses SerialPort Control to send/receive commands to/from microcontroller.

Here is the basic

CODE:

I maybe missing something because the reaction of microcontroller very accidential! I mean, sometime it works from the first click and sometime from the third... I must make a number of clicks until it reacts back!

View 1 Replies

Communications :: SerialPort Timing Control

Feb 17, 2009

I am using VB2008 SerialPort to communicate with a device. My problem is, using RTS handshake I am missing the first 50 or 60 chars, after that everything is intact. I tried to change the buffer size - Has no effect, used standard, bigger, smaller and no change.

The device timing says when it sends CTS signal, it will start listening 100ms after that. I have no clue how to delay the write to test this. Should I first write to the buffer then write to the port after a a 100ms timer event?

View 3 Replies

SerialPort And Control Updating In MDI Form?

Mar 2, 2012

i am receiving data from serial port and i update a richtextbox in a MDI Form with the control.invoke method

(Code in SerialPort.DataReceived Event)

If myTerminal.Visible Then
myTerminal.MyRichTextBox1.Invoke(New MethodInvoker(Sub()
myTerminal.MyRichTextBox1.AppendText(dataLine & vbCrLf)
End Sub))
End If

But as a mdi form it has the ability to close and reopen. So when the serialport is sending data to richtextbox and the user click the close button and the form gets disposed. Then the error "Invoke or BeginInvoke cannot be called on a control until the window handle has been created."...

View 1 Replies

Read A 12 Byte Hex String (RFID Tag ID) Using SerialPort Control?

Apr 23, 2012

I'm trying to make an application that can read a 12 byte hex string from the serial port and display it into a text box, the source is a RFID module that is connected to my USB port using a RS232-USB converter.My first problem was accessing the text box in the datarecieved event due to invalid cross-threaded operation. Upon googling that, I copy/pasted the code I needed to get it work, these are all the cross threading functions.The OpenPort function and Datarecieved event are my own code, the rest I got off google. The application then worked, but I would get an incomplete code, the first swipe I would get all 12 digits, and at every other swipe, the first byte would vanish. Upon some more reading, I decided to make an array, the size of the incoming data (shown in the code below), but now I get the cross-threading error again.I know there's something wrong with the way I'm using the array. This is way beyond my VB knowledge, and I'm in o I'm an electronics engineer and self taught myself a little programming to create some apps for my hardware.Updated code:

Public Class Form3
Dim msg As String
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

[code]....

View 1 Replies

Send A Tare Command To A Weighing Scale Through Rs 232 Using Serialport Control

Aug 27, 2009

i am developing an application which needs to connect to a weighjng scale throug rs 232 and capture the output. after inserting the record however the pc needs to send the tare command to the weighing scale in order to set the scale to zero. now he tare character as far as i guess ia T i sent the command like this

serialport1.write(chr(27) & "T" & chr(13) & chr(10))

View 1 Replies

Get USB Control For The USB Port Communication? Like The SerialPort Control For The COM Port

Jul 17, 2009

Do someone know if there is a\\ USB control for the USB port communication? like the SerialPort control for the COM port.

View 2 Replies

Working With WebBrowser Control?

Aug 2, 2010

I am trying to search a page for certain links only, but can't seem to find a way to have it 'search' for a 'keyword' in the links, and only list those in a ListBox - What I have now works to grab ALL the links on the page, but I need to only find SPECIFIC ones:

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click

[code].....

View 10 Replies

.net - FileUpload ASP.NET Control Not Working Under Windows 7

Apr 28, 2010

I have a User Control that contains a System.Web.UI.WebControls.FileUpload control as well as a button to 'Submit'.

When the button is clicked code similar to the following is executed:

If FileUploadControl.HasFile Then
'Save the file and do some other stuff
End If

This code works just fine with Windows XP. However, if I run it from a Windows 7 64-bit machine using IE8 32-bit the HasFile property always returns false and nothing is saved?!

View 1 Replies

C# - Chart Control Interval Not Working?

Apr 15, 2011

I have asp.net chart intervel issue. I am feed data to chart like below
X1 Y1 X2 Y2
100 907 500 2395
100 745 500 2343
100 760 500 2403
Each row is a series in the chart.

In am iterating each row in code and making new serie and adding to chart
series1.Points.AddXY(dt.Rows(i)(0).ToString, dt.Rows(i)(1).ToString)
series1.Points.AddXY(dt.Rows(i)(2).ToString, dt.Rows(i)(3).ToString)
Chart is coming like it is fine. Now I want make interval like 100,200,300,400, 500 (500 is max of the graph). I tried Chart1.ChartAreas(0).AxisX.Interval = 100, It did not worked out.

View 1 Replies

C# - Working With Frames In Webbrowser Control?

Oct 18, 2011

I am using <webbrowser>.Document.Window.Frames to get frames.My <WebBrowser> having 2 frames.My only problem is ,I seem one at index 0, but not 1.

HtmlWindow wf = wb.Document.Window.Frames[1];
string s = wf.Document.Body.OuterHtml;

and view source

<frameset rows="0,*" border="0" frameborder="0" framespacing="0">
<frame name="entrustTruePassAppletFrame" src="EntrustTruePassApplet.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
<!-- It is mandatory for the frame where the user interaction happens to have the name defined in the Configuration as appletHtmlGuiTarget-->
<frame name="entrustTruePassGuiFrame" src="AuthenticateUserInputRoamingEPF.html"> </frameset>

View 1 Replies

Checked TreeView Control Not Working

Aug 18, 2009

I have a treeview control with check boxes. when I check the parent node, all the children check too. The problem is, I want the parent check box to automatically uncheck if one of the children is unchecked.

Private Sub TV_Communities_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TV_Communities.Click
For i = 0 To TV_Communities.Nodes(0).Nodes.Count - 1
If Not TV_Communities.Nodes(0).Nodes.Item(i).Checked Then
TV_Communities.Nodes.Item(0).Parent.Checked =
False
End If
Next
End Sub
davidbell

View 8 Replies

Code Working If Use Web User Control Of Asp.net?

Jan 27, 2011

How to use this code working if i use web user control of asp.net ?

[Code]...

View 2 Replies

Control Arrays - Working With Indexes?

Dec 4, 2009

How I can make control arrays like vb6? I need for example,
button(1).backcolor=...
button(2). backcolor=... etc.
And I wanna work with it's indexes.

View 4 Replies

Timer Control As Stopwatch Not Working?

Nov 3, 2011

I am using Timer control as a stopwatch to populate couple of Label controls text field. I am listing the code below which is not updating the Label fields. I have removed the code related to buttons and other controls. Why is the Timer1_Tick not being invoked? The code is compiling clean and when I walked thru the debugger, my Start_Timer() and Stop_Timer() subroutines are working. However, nothing is happening in the Timer1_Tick() subroutine. I would like someone

Dim MyTime As New DateTime
Dim MyCondition As Integer = 0

[code].....

View 5 Replies

VS 2008 Webbrowser Control Not Working Right?

Mar 31, 2010

1) i have a WB control that is scraping a page... it worked fine for weeks. now today. it stopped? its not "seeing" things the same!?? makes NO sense?My wife has the same program running on her machine and hers still works... so I know the page did not change (i looked at the code)fyi.. lol... this is a facebook page scraper for farmville itemsso anyway...example its looping through the links..find the right links, checks this.. checks that...then gets to thisDim hClass As String = link.GetAttribute("classname").ToLower.ToStringnow it was gettting the class... now it just returns "passiveName" which is NOT the class?

View 2 Replies

Working On A Control Panel For A Game?

Jun 21, 2009

Okay i'm working on a control panel for a game.And one thing the control panel does is actually opens the game.My problem is when running the program using shell() i run into the issue where it will run the game, but won't load the data from the config files it uses.I've also have this problem with a server that uses an admin.ini and a config.ini and doesn't load any of the data from those files.

I've tried using google over and over again, and no where did i find a website that can help me with my problem

View 1 Replies

.net - Working In Combination Of TabControl And DataGridView Control?

Jun 3, 2011

I am not sure whether it is possible or not? need suggestion.I want to display filenames from 2 different folders into 2 different DataGridview controls that are placed in 2 tab pages of TabControl1. Here is the code that I have tried. By running this code, I can able to show the filenames from a folder onto DataGridView1 in Tabpage1 but not in DataGridView2 of tabpage2.

[Code]...

View 1 Replies

Adobe PDF Reader Control Not Working Win7 32 Bit?

Sep 1, 2011

I have an application that I developed (and worked) in Windows XP. Now that I try the same exact program on Windows 7, it doesn't work. It's a simple test of the Adobe plugin, so it's nothing fancy. Here's the code:

Public Class FrmMain Private Sub BtnOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOpen.Click

[Code]...

View 3 Replies

Detecting The Key Pressed, When Working With Web Browser Control?

Feb 9, 2010

I am working on an application and I need urgent help. One of my forms contains a web browser. I need to detect if F3 key is pressed while the web browser is active, so a dialog box will appear for a particular functionality of the application. But unfortunately web browser control does not have keyup, keydown or similar event to help me detect if the F3 key is pressed. As far as I know, one way to solve this problem is adding a menu which has F3 shortcut. But my application does not contain any menus, so I dont want use a menu in this part of the application.

View 1 Replies

Settting Up Control Properties In Between Postbacks Is Not Working

Apr 16, 2010

I am settting up control propertis on page load. Like visiblilty of control depending on loaded data. And very simple setting up images to button controls. For page load it works fine but on postback these values are not set back. This is my code. When it's a postback btnSecurityQA image is missing and visibility of all following controls is not set accordingly.

If Not IsPostBack Then
ButtonImage.SetPath(btnSecurityQA, GetLocalResourceObject(btnSecurityQA.ID & "BaseName").ToString())

[Code]....

View 1 Replies

Timer Control Not Working In Proper Interval

Nov 13, 2009

I have dragged and droped a timer control "tmrGetMappingXML" from the Common Controls Tab in Tool Box. The issue that I am mentioning also appears for the Timer Control present in the Components Tab in tool box.

In the form Load I have written:
HTML
tmrGetMappingXML.Interval = 3600 '1 Hour = 3600 Seconds
tmrGetMappingXML.Enabled = True
tmrGetMappingXML.Start()

The timer interval is also set in the design time to 3600 seconds. But the Tick event of the timer fires continuously every second.

View 3 Replies

User Created Control Not Working In Form?

Dec 30, 2010

I created a user control with a label and 2 combo boxes, and a public property called ControlDataSource that accepts a dataset - which it populates the combo boxes with. I added the reference to the VB project I want to use it on and to the toolbox. I was able to draw it on the form with no problem and use it. However, after changing the backcolor on the control and recompiling it, it is no longer seen by the form. When I bring up the form it's used on, I get a white screen with a bunch of xml. The problem seems to be in the designer, and I get an "object reference not set to an instance of an object" error. Here is the code from the designer:

[code]...

The reference error is pointing to the line: Me.UcDx1.ControlDataSource = Nothing

Here's the wierd part. If I hover the cursor over that property, it correctly identifies it as a dataset. So it does know what it is, but it can't seem to use it.

View 3 Replies

VS 2005 Webbrowser Control Gotfocus Not Working

Jul 29, 2011

I have two web browser controls on my form. I also have several buttons like bold, underline, etc. My probem is the gotfocus of the web control is not working correctly. If I click on the web browser control to add text the gotfocus is not fired. If I click on a text box first and then click in the browser control it is fired. I need to know which has focused so the bold etc know which control to work on.

View 1 Replies

VS 2010 Working With IFrames In The WebBrowser Control?

Feb 4, 2011

So, I'm trying to make a spiffy little program that lets you search for flash games, and it will automatically display the flash game within the program. (by writing document text to a webbrowser control) Unfortunately, the site I use to get the games from uses iFrames from Custom Google Search to house the search results. I know how to deal with frames in a webbrowser (WebBrowser1.document.window.frames("frame name here").document.so on and so forth), however it seems as though iFrames are different. When I try

WebBrowser1.document.window.frames("googleSearchFrame")
, it doesn't recognize that it's there. Same thing if I replace the name with the index of the frame - it's not there. Using

[code].....

View 5 Replies

WebBrowser Control - Fill In Password Not Working

Aug 28, 2011

I have a pretty good understanding of VB.NET. Basically I'm trying to fill in the password to login to a school website, but for some reason it won't fill the value in. The closest that I've come is getting the password to appear on screen, but it's not masked with asterisks and when I click login it says invalid password. It's almost as if it edits the label right before the text box for the password.

Here's a section of the html code from the login page:
HTML
<FORM ACTION="/pls/PROD/twbkwbis.P_ValLogin" METHOD="POST" NAME="loginform" AUTOCOMPLETE="OFF">
<TABLE CLASS="dataentrytable" SUMMARY="This data entry table is used to format the user login fields">
<TR>
<TD CLASS="delabel" scope="row" ><LABEL for=UserID><SPAN class=fieldlabeltext>UID:</SPAN></LABEL></TD>
[Code] .....

The textbox that has the NAME="PIN" is the value I wish to change. Here is some of the code that I have tried where webMain is a WebBrowser VB.NET control. This doesn't work, but does display the unmasked password:
Dim passwordTextBox As HtmlElement = webMain.Document.GetElementById("PIN")
passwordTextBox.InnerText = txtWingsPIN.Text
The webpage [URL]

View 1 Replies

Working With Adobe Reader ActiveX Control?

Mar 28, 2007

my Application I'm using adobe's avtiveX control AxPdf for opening the PDF files for viewing the PDF files from my application. the appliication is working fine for some time and suddenly it is giving me an error that unable to find he adobe acrobat reader. or handler missing like that.

View 6 Replies

Custom Control - Combined Properties Partially Working

Aug 15, 2011

Asking for little guidance again... For my custom control, I grouped some properties in some class. Then in the main control code, I use:

[Code]...

View 7 Replies

Taking Control Of Another Application With Sendkeys Or Windows API Is Not Working?

Nov 18, 2011

I have tried to control another application to automate a process we do 100 times a day. It is simple enough, a few key strokes is all but I have been foiled in all attempts

View 1 Replies







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