Capture An On/off Signal From A Relay And Count The Seconds Of Elapsed Time Between The Cycles On A Com Port?

Dec 27, 2011

how to capture an on/off signal from a relay and count the seconds of elapsed time between the cycles on a com port? Also, which pins on the com port should be used for this?

View 12 Replies


ADVERTISEMENT

Communications :: .net MSComm Port USB 4 Port Relay?

Oct 20, 2011

I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay

"01+//" - Relay 1 is switched ON
"01-//" - Relay 1 is switched OFF
"02+//" - Relay 2 is switched ON
"02-//" - Relay 2 is switched OFF

[code].....

So i am confused as to how to separate each relay out with that code above and just be able to turn on any number 1-4 relay on or off independently from each other!

View 1 Replies

MSComm Port USB 4 Port Relay

Oct 20, 2011

I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay I was following what the guy in the post was doing to turn his on:

[Code]...

View 6 Replies

Get The Elapsed Minutes And Seconds Which Will Then Be Displayed To User

Aug 30, 2009

I am using a stop watch to get the elapsed minutes and seconds which will then be displayed to user. How to I go about getting the elapsed time in the following format: 00:00

View 5 Replies

Capture A Tv Dvb-s Signal?

Dec 13, 2010

I am trying to capture a tv dvb-s signal via vb.net since a long time now.I have tried to get it work with the Microsoft examples, but no success till yet.I had success with analog tv tuning, but digital tuning is still far away, also I don't find any examples with dvb-s and vb.net or c#.

View 1 Replies

Parallel Port And Relay Control?

Oct 26, 2009

im new around here and also to VB.NET infact any aspect of programming, im hoping to be able to some useful stuff but at the momment im a little stuck i only have basic knoweldge so anyway here goes im programming in VB.NET 2008 Express edition, im also using inpout32.dll which is running ok and also controlling the parallel port fine.the problem i have is as follows the program so far is controlling the 8 outputs at the momment, i can turn each individual one on but when i try to turn multiple outputs on it will only turn on one and the other that was turned on goes off i understand its controlled in a 255 bit array but how to decode it is a little tough

View 5 Replies

VS 2008 Control Relay Via USB Port

Mar 27, 2010

currently doing a college project called Home Appliances System by using Voice Command.I have done the voice command part and now it comes to the interfacing between PC and relay board part. Currently I'm considering using USB port to send data(to trigger the home application). Does anyone know how to do it with VB.net?

View 9 Replies

Counting Elapsed Seconds Since The User Start Being Active?

Jan 29, 2010

I am trying to write a program to count the total seconds while the user is active (moving his mouse".. I have the following code

' Get the mouse's current position and see if it has moved since last time. private Sub mrCheckMouse_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles tmrCheckMouse.Tick Static done_before As Boolean Static last_point As POINTAPI Dim cur_point As POINTAPI

' If we have done this before, compare the ' current mouse position to the previous one.

[Code]...

View 6 Replies

Send Byte,signal,string Or Puls Usb Port?

Feb 14, 2010

How can i send byte/signal/puls usb port?i want to this

View 3 Replies

Send Data / Signal To H-Bridge Then To DC Motor Using Parallel Port In Program?

Jan 21, 2012

How will I send data or signal to H-Bridge then to DC Motor using parallel port in vb.net?

View 2 Replies

Calculate Elapsed Time?

Aug 12, 2010

example

textbox1.text has a value of 08:00
textbox2.text has a value of 16:00

[code].....

View 8 Replies

Calculate Cost From Elapsed Time?

May 27, 2010

I am trying to calculate a total cost from an elapsed time. Dependant on how long the time is, this will calculate the total cost. It has to be 3 to every hour. The elapsed time is displayed in label6 in "hh:MM:ss" format and the total cost needs to be displayed in label8.

View 4 Replies

Start And Display Time Elapsed?

Feb 6, 2009

When I click a start button I want to start and display the time elapsed if HH:mm:ss. Best way to tackle this?

View 1 Replies

Screen Capture Every 30 Seconds For 45 Minutes

Jan 20, 2010

I'm trying to develop a windows form app which will take a screen shot every 30 seconds for about 45 minutes. After 45 minutes, the user will click Finish, and these screenshots will be uploaded to a database. I don't want anything that simulates a PrintScreen key press, because I don't want to alter the users clipboard. The second issue is, for users with multiple screens, I'd like to capture the entire screen image, not just from the primary screen. I'm using Visual Basic .NET 2005.

View 2 Replies

Capture Raw Signal From WiFi Card As Would A Sound Card

May 9, 2012

Is it possible to capture the raw signal from a WiFi card in the same way you can capture the signal from a sound card? (I already found code for working with a sound card and for drawing spectrograms) I'm wondering because it would make a cool radio-type project. I'd prefer a solution that integerates well with .net (VB or C#).My basic goal is to capture the ambient radio waves and build a primative "telescope" of sorts. Using the built in computer hardware is just the easiest way to accomplish this. If you have any other suggestions about how to accomplish this goal in a different way please post it as an answer also.

View 1 Replies

Calculating Elapsed Time Based Upon Two Values

Jun 26, 2005

I have one text box that contains a value for the "Start Time" and another text box that contains a value for the "End Time."Both of the values are expressed in a format for military time (i.e. 1200, 1300, 1430, etc.).When the "End Time" text box loses focus, I would like the "Elasped Time" (expressed in minutes) to appear in a third text box.Seems easy enough...right?Well the problem I'm having is since the first two numbers in military time are base 24 and the last two numbers are base 60, a standard calculation subtracting the "End Time" from the "Start Time" does not yield an accurate result.

View 3 Replies

Mutltithreading - Timer To Calculate The Elapsed Time

Feb 23, 2009

Im using the express edition of VB.Net to do my project. I have several threads in my program which run fine. However, im stuck at this problem. I have a button in my form, which if I click I will call ThreadA (works fine), If i keep it pressed for more than 2 sec i need to call ThreadB (doesnt work), and if the time is more than 2 min, i need to stop and send a msg to the user. I have tried the timer to calculate the elapsed time, so the tick function would call the thread. BUT this doesnt work... Im not sure what do to.

View 2 Replies

VB Function To Convert Decimal To Elapsed Time?

Jun 21, 2009

display a Decimal (or double) to elapsed time [h]:mm:ss (hours:minutes:seconds)using vb.net?

example:

if you were to type "1.34666666666667" into a cell in Excel then choose Custom Format [h]:mm:ss The result is an elapsed time of "32:19:12". Using the OADate function only runs on a 24 hour clock so this does not work for longer durations unfortunately...

View 4 Replies

VS 2008 Finding The Elapsed Time Between 2 Times

Oct 21, 2010

Bit stuck on this one, have seen alot about how to do it just cant seem to get it right. I want to have 2 text boxes with times in them.. at the moment i have them on click events then it just runs a Now for the time and fills the boxes from the system time. But then i want the 3rd box to find the elapsed time from the 2 times in the previous boxes but i just cant seem to figure it out

[Code]...

View 10 Replies

VS 2008 Finding The Elapsed Time Between 2 Times?

Feb 19, 2010

Bit stuck on this one, have seen alot about how to do it just cant seem to get it right.I want to have 2 text boxes with times in them.. at the moment i have them on click events then it just runs a Now for the time and fills the boxes from the system time.But then i want the 3rd box to find the elapsed time from the 2 times in the previous boxes but i just cant seem to figure it out

View 1 Replies

.net - Elapsed Time With Environment.TickCount() - Avoiding The Wrap

Apr 16, 2009

Does the absolute value protect the following code from the Environment.TickCount wrap?

[code...]

View 5 Replies

C# - Update A TextBlock With Elapsed Time Causing An UnauthorizedAccessException

Jul 22, 2010

I have a very simple StopWatch application in Silverlight. I have the following private properties in my MainPage class: _StopPressed (bool), _TimeStart, _Elapsed (string). I also have a "Start" and "Stop" button. The "Start" button calls a method called UpdateTime that constantly updates _ElapsedTime until _StopPressed is true. When I originally wrote it, UpdateTime would block the UI so I couldn't press the Stop button, so I updated my code to use System.Threading.ThreadPool.QueueUserWorkItem with my UpdateTime method so that it updates _Elapsed on a background thread. That works great at updating the value.However, if I try to set the .Text value of my TextBlock from within UpdateTime(), I get an UnauthorizedAccessException that has to do with one thread accessing the data in another thread.What do I need to do to avoid getting this exception and appropriately update the UI without blocking it?

View 1 Replies

Display Elapsed Time - Generating Numbers Between 1 And X Randomly

Jan 15, 2010

How long it would take to generate all of the numbers between 1 and X randomly.
X=1,000,000 took 6 seconds, and for 10,000,000 took over a minute.
Does that sound reasonable?

Experiment
stopwatch start
count = 0
do while count < x
select a random number between 1 and X inclusive
have i selected this number before?
no-add 1 to count
yes -
loop
stopwatch stop
display elapsed time

I made the Do Loop UI un-friendly and ran this from the IDE using CTRL-F5. My PC is 1.8Ghz and has 2GB of memory. I am using VB 2008, .Net 3.5 SP1.
Looking for work - Zip 65101 [URL]

View 21 Replies

Index System.timers.timer For When Time Has Elapsed?

Mar 8, 2011

I'm creating a multi-threaded application (although it is not at the moment) which will be connecting to a large number of sockets. I've noticed when a connection cannot be made the connect timeout is rather large, so I am trying to make my own. Here is what I have come up with...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
CreateSockets(2)
AssignSockets(0, "192.168.31.2", 80, False, False) 'shouldn't connect
AssignSockets(1, "192.168.1.1", 80, False, False) 'should connect

[code]....

Looking at the timeoutOccured() sub, you can see I'm unsure of how to specify which index to set. Efficiency is important since this will be housing a lot of connections at once. Something else that just came to mind, would .theTimer.Stop reset the tick value on the timer?

View 4 Replies

Know The Time Elapsed During Copy Paste Operation And Then Show It To The User?

Dec 28, 2010

I need to know the time elapsed during this copy paste operation and then show it to the user

[Code]...

View 11 Replies

Countdown From 10 Seconds To 0 Second,then Capture Image And Save To The Specific Folder?

Oct 28, 2009

This code countdown from 10 seconds to 0 second,then capture image and save to the specific folder,and than countdown to -1,-2,-3 etc,but I don't wont thet count to -1,-2,-3 etc..I would like to do that when it comes to 0 seconds,that the timer countdown again from 10 second countdown to 0 and overvrite the image

[Code]...

View 7 Replies

VS 2008 - Getting Signal From PIC16F877A To VB 2008 Through Rs232 Serial Port

Mar 5, 2010

What i need to write is i get different signal from PIC16F877A and through serial port, i need to display diffrent text from different signal, Such as: Signal from portB.1 display 1, signal from portb.2 display 2. Between the microcontroller and serial port im using MAX232.

View 2 Replies

Create A Simple Timer To Count Seconds, Minutes And Hours

Oct 21, 2010

I have three sets of labels, lbl_seconds, lbl_minutes and lbl_hours. These labels have the default value of 00:00 and I want the timer to change that for each label. I have googled this but I cannot seem to find any good info on it. Do I need three separate timers? I have also noticed that the timers have their own tick event handler. I guess it's in this that I need to change the value of the label. But I cannot figure out how to do just that.

View 2 Replies

Write Program That Does Count Down On Number Of Seconds Entered In D Prog

Jun 13, 2011

I have to write a program that does a count down on the number of seconds you entered in the GUI I have most of the code and it basically has to countdown the seconds i type in the txtStart. Attached is the program design..This is what i have so far with the code. It converts seconds to hours and minutes and seconds, but it doesn't do the countdown.[code]

View 2 Replies

Asp.net - How To Add Seconds To Time

Oct 11, 2011

I was wondering if it's possible to add seconds to a clock in vb.net. I mean lt's say I have a label and I assign it to DateTime.Now(), how would I show/display the time with the seconds "ticking"?

View 1 Replies







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