Plot Serial Data In Separate Thread?

Dec 29, 2011

my application receive data from serial port and store it in ConcurrentQuequeFor not lost any data from serial port I need to plot it in a separate theadin SummaryForm Load = set all parameter of ZedGraphPulsante Start = Open serial Port and start Thead

View 5 Replies


ADVERTISEMENT

Plot Graphic While Reading Data From Serial Port

Mar 24, 2012

Currently, I am using a VB.NET to read data from serial port. when i open the serial port, the data is read and plotting the graphic at the same time

View 2 Replies

Interface And Graphics :: Plot The Graph From The Serial Port?

Sep 20, 2011

I new in vb .net. Now doing the robot mapping project from the arduino serial port and VB 2010 as a GUI. The serial port can read the text from arduino sensor but how to plot the graph from all the sensor value? So when ultrasonic detect the distance will give the pixel or point. I using the picture box as a background grip map.

[Code]...

View 1 Replies

Write An Application For Receiving Data (ascii Characters) From Microcontroller Through The Serial Port In Three Separate Parts

Jul 18, 2009

I need to write an application for receiving data (ascii characters) from microcontroller through the serial port in three separate parts. I've created three RichTextBoxes, but I do not know which commands I need to type. In first textbox I need to receive one byte... next six bytes need to be placed in second text box, and finally last seven bytes need to be placed in third textbox.

View 11 Replies

Run A Method On The Main Thread From A Separate Thread?

Dec 31, 2010

I'm reading data from a serial port, but the DataReceived event of SerialPort is handled on it's own thread. I want to handle this on the main thread, but simply declaring an event and raising it still results in it being processed on the SerialPort thread. I'm assuming I need to declare a delegate I can call, but I don't see how that would work.

For example, I want to call Sub HandleDataReceived() on the main thread from the DataReceived thread, having HandleDataReceived() run on the main thread. How would I do this?

View 1 Replies

Multi-threading Forms - Open A Separate Form As A Separate UI Thread From The Start Up Form

Oct 27, 2011

I have a few forms that have a lot of really intensive updating along with a great deal of user interface (text boxes, button clicking etc) Is it possible to open a separate form as a separate UI thread from the start up form that called it to "show" or open or whatever the new method might be?

View 6 Replies

Load The Main Form Of A WPF So That A Separate Thread Goes And Gets Data From The Database While The Form Is In An Apartmentstate?

May 15, 2012

How do i load the Main form of a WPF so that a seperate thread goes and gets data from the database while the form is in an apartmentstate? (drag-able / movable) I Know this is possible with opening a new window from your main form like this :

Private Sub openOrderWindow()
Dim OrderWindow As Orders = New Orders
OrderWindow.ShowDialog()
End Sub

[code]....

I've tried putting MyBase.ShowDialog() and .Show() and .9000+ other things The only benefit I've got out of using a seperate thread to load from the databse is i can see the screen right away (as oppose to it being a transparent box until it loads) but i cannot move it around or minimize it?is there any way to make it Movable while it loads?

View 1 Replies

Create A Graph Where The User Can Input Data Into Textboxes And Then Plot The Data?

Jun 15, 2009

I'm just trying to create a graph where the user can input data into textboxes and then plot the data. I am attempting to use Zedgraph, but open to other suggestions. The program below creates a plot, but it won't update when the textboxes are updated.

Imports ZedGraph
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[code]....

View 7 Replies

Run A Loop In A Separate Thread?

Sep 24, 2010

Is there a way I can run a loop in a seperate thread and increment a progress bar each time the loop iterates? I am trying to run a loop that will take a long time to complete and I dont want the form to be completely crashed out while the loop is running. There are only two ways I can think to solve the problem. The first way is to run the loop on a timer. This is extremely slow. The other way is to use a thread.

View 1 Replies

Run Timer On Separate Thread

Jun 2, 2012

I just finished up my space invaders movement and with all the other timers running it really bogs it down. So I think the best solution would be to make the timers run on separate threads. I know roughly how to do this from a old example I read a long time ago. So I just need a simple sample code to refresh my memory please. Maybe something with message boxes or something to demonstrate the process.

View 1 Replies

Charting - Plot Data Using The First Value

Nov 29, 2011

I have been learning and developing a software using VB for my company. I seem to have some issues with Chart function. [Code] Those 2 points will plot 2 datas (xval, finvall) & (xval, finvall2). Here is the thing. When I do the plotting, the starting points are always at (0, 0). That points come from the data point collector editor in the series properties. The question is: How do I plot data using the first value that I have? I don't want to start at (0, 0) but instead using (xval, finvall) & (xval, finvall2). I can't change the data point at run time. Many thanks!

View 6 Replies

Allow A Progressbar To Be Changed On A Separate Thread?

Mar 6, 2011

how can i allow a progressbar to be changed on a seperate thread? my code keeps saying that i cannot access it because it was created on a seperate thread:

[Code]...

If it is not worth it, it is not fun - you say programmers are boring but i say they are worth it.

View 1 Replies

Call A Delegate From Separate Thread?

Jun 10, 2011

So, I'm having troubles implementing a separate thread. This is because I have a simple class, and in it I start a new thread. So, as it is not any form, I haven't found any way to make it call the function in the UI Thread.

So, I cannot use the Invoke method. Is there any way to call a function from another thread?

View 2 Replies

Create New Form On Separate Thread?

Jan 10, 2010

I would like my application to do something (in one form) and while form is doing that i would like to show another form to the user. Code is:

Private Sub blaa()
Dim a As New Working() 'working is another form
a.Show()
'Do some stuff
a.Close()
End Sub

But when i make new form i find it is on the same (main thread) and therefore new form also frozes. How to make new form on separate thread?

View 4 Replies

Running A Progress Bar On A Separate Thread?

Apr 11, 2012

I've made an application which goes through a long procedure when a button is clicked. I don't want the user to think the program has frozen, so I'd like to add a marquee progress bar just to show that it's still running. However, if I simply add the progress bar and make it visible when the button is clicked, the bar will appear but freeze and wait for the procedure to finish before it starts scrolling.

I know this is due to both the procedure and the progress bar running on the same thread, but the tutorials I've seen on getting a process to run on another thread seem confusing. What is the simple way to make a progress bar run on a separate thread?

View 12 Replies

Running Function In A Separate Thread

Mar 31, 2011

when trying to run a function in a separate thread, my reason for trying this is because since the application is only run on one thread, the GUI hangs when the function is called.[code]In this code, the Print screen Button is pressed and the function HookCallBack is called.The problem is that the function has variables that need to be passed and returned, and while searching, i found a website that had an answer for this, and it required the function to be put in a class, and then it could be run on a separate thread while still passing all the variables needed.url...But the code cannot be placed in a class without giving errors and it seems to me like i did something wrong. The code is meant to be used in a form and not a class.My question is, how would i go about running the HookCallBack Function in a Separate thread?

View 5 Replies

Running Process In Separate Thread

Mar 24, 2009

Here's the problem I am trying to solve. My program can export a file as a pdf. and other formats. I can open the file using process.start. My file doesnt have a good name so I am using a GUID as a name.

[Code]...

View 2 Replies

UI Freezes Though I'm Running My Sub On A Separate Thread

Aug 11, 2011

I'm working on a checksum tool, which loads all the files in a specific folder to a listview then, calculates the hash value of each file and save it to a text file.Ok, everything is working properly except for the calculation, when I start it on a separate the my UI freezes.[code]...

View 5 Replies

Update A Form From A Separate Thread?

May 9, 2010

I've looked at the on line doc over and over, and I can't seem to figure out why this won't work. This code runs the thread, and the thread seems to execute the code in the 'threadsafe' sub, however neither the progress bar is updated or the button click performed.

Imports System.Threading
Public Class VisNotify
Inherits Form

[Code].....

View 4 Replies

Update UI From A Class In A Separate Thread?

May 4, 2010

The code below works fine when I put it in form1.vb and change "form1" to "me" but I can't seem go get it to work from my class.

VB
Imports System.Threading
Public Class Class1

[Code].....

View 2 Replies

Adding Items To ListView In Separate Thread?

Jan 26, 2010

For some reason, the following code is causing me some issues. This code pulls lockout status data from AD and contains the data within a datatable. An event is raised from the threaded procedure to add the data to a listview control. For some reason one row of data gets added to the listview control and when you run the procedure gain, 2 rows of the same data gets added, and then 3 rows, etc.

This code calls the procedure "CallGetUserLockout"
GetLockoutStatusToolStripMenuItem.DropDownItems.Add("For Current User - " & User, Nothing, AddressOf CallGetUserLockout)

[code].....

View 3 Replies

Create A Timer To Execute On A Separate Thread?

Jan 23, 2012

Currently I'm creating a task that runs a hardware i/o loop for the duration of my program.i.e. it's a task that's created at the program's start and runs a loop that is only broken at the programs termination. Each loop cycle communicates via ethernet to hardware.depending on time outs each cycle takes 30-300 msec)I've noticed that if the loop runs with out any break that the program really slows down... to counter act that I placed a thread.sleep(x) in the loop

View 6 Replies

Forms :: Load Progress Bar On Separate Thread?

Apr 29, 2010

I have created a form in which i am loading thousand of records. so i want to display a progress bar.Actually i am moving from MDI main meny to some other form so when i click that menu item i want to progress bar till my total records are not loaded.

View 3 Replies

How To Set Global Keyboard Hook On Separate Thread

Apr 29, 2012

After many searches i end up using this class for global keyboard hooking. Link: Global Hook post [code]My app is performing operations that take some seconds to complete (ftp upload small files on interval), and during this time the hook lovks the keyboard. This i dont want of course..I cant jump to Async FtpWebRequest right now because it needs many changes, so i thought that the solution would be to make the hoook live in another thread.A proposal is to move my time - consuming operations (upload) to another thread.Upon doing this i am facing other problems. Because the time consuming task (upload) is in a timer i would have to rewrite a big portion in order to synchronize the file->save with the file->upload and i dont mind the app locking for 3-4 secs. what i do mind is to loose the kayboard for 3-4 secs.

View 2 Replies

Separate Thread Accessing To Main Ui Controls?

Aug 25, 2009

how to access the main ui's labels from a delegate method?

View 7 Replies

VS 2008 Infinite Loop In Separate Thread?

Jun 25, 2010

Im working with and trying to run an infinite loop on a new thread which at some point takes action (e.g. make changes to Viewport3D). But no matter what I use:

- BeginInvoke

- Background Worker

- Timer

I run into problems. My porblems are:

[Code]....

I am doing all this in WPF.

How can I run the loop in the background and get it to affect the Viewport3D controls content without throwing an error or freezing up the application? A Viewpoirt3D is a control in WPF.

View 5 Replies

Pass Serial Data From Serial Data Received Event

Dec 13, 2009

I'm trying to pass a data packet from the serial data received event.The code can capture the data without any issues.I'm spinning my wheels on getting the data packet out of the thread for further processing.[code]

View 4 Replies

Use ZedGraph To Plot A Graph Based On Some Data?

Oct 2, 2009

I'm currently trying to use ZedGraph to plot a graph based on some data I have extracted from a machine, with reference to a user entered "Frequency" range. I has to be a line graph, with Frequency on the X-axis, and extracted data on the Y-axis. There are 4 channels for the machine, but all data values extracted are close to each other, so multiple Y-axes are not needed. I'm also trying to do it within a class, and the graph should only be drawn when I click "Button3", otherwise there would be no data anyway and button2 extracts the data.

Below are my class (the graph code is at the bottom) and form1, which button3 should call the class, but I'm stuck for both the button interfacing and the class writing. I have also attached the output I get so you can have a look at what I need. Open it in Excel to see the format. The whole program is also attached as a text file if you prefer it that way.

[Code]...

View 9 Replies

Doing Work In Separate Thread To Prevent Form From Hanging

May 9, 2011

I have a really simple form with a button that fires a Sub I created which gathers data from ActiveDirectory and adds it to an Excel Sheet. The problem is, when I click this button the whole form hangs. So I figured the operation that gathers the data and adding it to the Excel sheet should be run in it's own thread, so that the form won't hang. Possibly it would be great to add a progressbar as well. The progressbar however is located at the Main userform that starts up once the projects is run.

I've got one MainForm.vb and one CodeFile.vb. I want most of the code in the CodeFile.vb so it's tidier.
MainForm.vb
Imports User_edit.CodeFile
Imports System.ComponentModel
Public Class MainForm
Private Sub btnImportData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImportData.Click
[Code] .....

Notice the ExportFromAD Sub I've got in the CodeFile.vb. This is what is actually doing the work. In the For each loop that adds data to the Excel is where I've put the MainForm.MyBackgroundWorker.ReportProgress(i * 10). Problem is, it doesn't actually update the label on the form. Which I find pretty weird because the form isn't really hanging or anything. Is it trying to access a different thread or something? Meaning, the form is run on it's own thread which can't be accessed from my second thread?

View 2 Replies

VS 2008 [Multi-threading] How To Run This Code In A Separate Thread

Apr 21, 2009

I am creating an IDE for a game script with similar functionality as the Visual Studio IDE (at least, some of it). The game script consist of code that looks visually a bit like C code. It uses braces to define the start and end of a 'class' and uses nested braces to define the start and end of an 'event' in a class.

What I want finally is to have two Comboboxes above the text editor, one that lists each Class and the other listing each Event. The comboboxes should also show the Class and Event that the caret is currently in, just like in Visual Studio.I have attached an example of such a script (you can open it with Notepad).However, here is a short example where you can also see how I "defined" classes and events:

class1
{
event1
{

[code]....

As you can see, the classes are the 'names' of each block of code, defined by matching braces { }. The events are the names of each nested block of code, also defined by matching braces { } but inside a class. There is only one level of nesting.As you can also see, the layout can follow the standard C-style layout, or a slightly different layout (using the opening brace on the same line as the class/event name), or even a completely chaotic mess. As long as the braces match correctly, the code is valid.So in short, the large blocks are classes, while the nested blocks are events.

What I want to do, is parse an entire script, and store all the Classes (and eventually, also all the Events, but let's forget about them for now). I want to store the Class name, start position (defined as the start index of the name), end position (defined as the index of the closing brace) and the full text (defined as the text between start and end position, so including the name).

vb.net
Public Class clsClass
Private _Name As String

[code]....

The code works basically by finding every first opening brace (the opening brace of each CLASS, not event), and then loops through the class (using a brace counter to keep track of the nested braces) until it found the last closing brace. It then stores the name, start, end and fulltext in a new clsClass and adds it to the list to return.

View 3 Replies







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