VS 2010 How To Generate Signals

Apr 16, 2012

I need to make a program that whatever user enters in bits, then corresponding Return-to-zero signal would generate.. how to generate signals.. so would it be possible to make it in VB.NET?

View 8 Replies


ADVERTISEMENT

VS 2010 - SerialPort Lagging - Serial Port Is Open And Waiting For Some Signals From The Dyno

Sep 9, 2010

I have things set up so that the program is ready to start logging ,only when Recieving=true.This is controlled with Button1. So I click button1,Serial port is open and waiting for some signals from the Dyno.When 1 signal come it put a "1" in TextBox1 ,and for the second a "2" and so on. Thing is sometimes it starts right away, like I want it to,and sometimes it lags a fraction of a second, even though the Port is open.When it lags there are already 5 to 10 signals gone by before it starts logging 1,2,3,...and so on. Sometimes it don't start at all.Then I have to close and re-open the form and it works,but with lagging on the first "set"

"Textbox1 > 0 then" triggers a timer (not seen in this code)that samples Textbox1 once pre interval and writes the value to a listbox. On the upside as soon as a "1" is displayed in textbox1 the timer starts like it's supposed to.I noticed this behaviour before I added the timer and besides the timer has nothing to do with the signals coming from the SerialPort. I have my form setup so I can run "sets".Run one "set"...save...reset...run another "set" ...and compare.It's always the first "set" thats off.If I run multiple "sets" the first one is completely "whacked", and the rest are consistent.

Think this could be the SerialPort lagging,or code problems?

Public Class Form1

Dim resetValues As Boolean = False
Dim RPM As Double

[CODE]...

View 19 Replies

Delay Between Sending The Pulse Signals?

Aug 19, 2010

VB 2005 conversion from VB6 I basicly have 2 questions. I am pulsing a relay up to 99 times per incident. I need to delay between sending the pulse signals. The delay time cannot change when I change between CPU speeds. I am assuming the sleep() function will work fior this. (This is a count of the number of game tokens to despense).

The second question is.. after I have pulsed the relay x number of times, I pulse another relay to send this number to a token machine to actually despense the tokens. While the tokens are despensing (about 1.5 minutes do despense 99 tokens) I want to release the computer CPU so that the cashier can continue to sell items. What command will allow me tho do this?

View 7 Replies

Writing A Exponent And Give Signals Out At The Same Time

Nov 9, 2009

I work with the Visual Basic Express Edition 2008. I'd like to write in a text box : 1s5 but the 5 has to be the exponent of s like 1s5 does anyone know how I've to write this in Visual Basic?

Second problem is:

Dim foo As New clsParallelPort(&H378, &H379, &H37A)
foo.communicate(2, clsParallelPort.switch.SWITCH_ON) 'switch data 1 on
foo.communicate(3, clsParallelPort.switch.SWITCH_ON) 'switch data 2 on

[Code]...

The problem is that I give out a signal to the 8 data lines and then to the control line 10 and then to the control line 1 but what I'd like to do is to give firste a signal out to the 8 data lines and then at the same time a signal out to control line 10 and 1. How can I do that?

View 2 Replies

VS 2010 : First Generate Random Numbers?

Oct 6, 2010

I have code to save records to my mysql database.But first I want to read what is the last number of record and add 1000 on that? What is the proper way to query that first. I want to make the result at unique ID of my clients. Here is my chunks of codes.

Private Sub addClient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim conn As MySqlConnection
conn = New MySqlConnection
With conn

[code]....

View 10 Replies

VS 2010 Generate Primes Over 100 Million?

Jun 27, 2010

I salvaged the following piece of code from:[URL]...This code works fine, but the problem comes when I need to get all the primes above 100 million. I am familar (at least a little bit) with the BigInteger class in .NET 4.0, but when I replace all the instances of "Integer" with "BigInteger" in the following code I get this error: Value of type 'System.Collections.Generic.List(Of System.Numerics.BigInteger)' cannot be converted to 'System.Collections.Generic.List(Of Integer)'.

(The reason I need primes above 100 million is that I'm trying to work through some projects on www.projecteuler.net)Anyone have some ideas on how to modify the code to work with BigIntegers,

[Code]...

View 2 Replies

VS 2010 Generate Sound Sweep?

Feb 24, 2011

I am trying to create a sub that plays a sound sweep from the provided values.The code im using works but it sounds horrbile, hacky crap.... I could go on.

Sub PlaySweep(ByVal min As Integer, ByVal max As Integer, ByVal Duration As Integer)
Dim playtime As Long = Duration / (max - min) 'The Play Time for each frequncy
For i = min To max

[code].....

View 3 Replies

VS 2010 Use The Password To Generate Key Bytes

Jun 4, 2012

[Code]...

I have found the above code on generating passwords but when I converted the whole project it displays 2 warnings that the code was obsolete but when I search google I didnt found any fix for that warning.

View 3 Replies

Can't Generate Reports In Visual Studio 2010

Jun 4, 2011

After downloading crystal reports for VS 2010, the code i used in VS 2008 generates a database login error

[code]...

View 2 Replies

VS 2010 - Generate Random Number Not Working?

Nov 19, 2010

I am trying to create a few random numbers, but cant seem to get it to fire off.
Public Function GetRandom(ByVal Min As Integer, ByVal Max As Integer) As Integer
Static Generator As System.Random = New System.Random()
Return Generator.Next(Min, Max)
End Function
When I call the GetRandom(0,500) and display it out on the page, I don't get anything?

View 5 Replies

Generate Random Number In VB Express 2008,2010?

Apr 20, 2011

How to generate random number in VB express 2008,2010...I want to generate number between 1 and 10.

View 14 Replies

VS 2010 - Generate A CRC16-X25 Checksum In The Form HiByte And LowByte

Apr 12, 2012

I've wanting to generate a CRC16-X25 checksum in the form HiByte and LowByte. All the examples I've found by searching are either VB6 which uses functions and data types that are no longer supported or C, C++ etc. Does anyone have a simple VB.Net version? Speed is not an issue.

View 10 Replies

VS 2010 : Generate A Number/value From The Users Hardware/os Data And Then Use That To Create A Key?

Jan 20, 2012

I am wanting to create a registration algorithm for my applications. I would like to generate a number/value from the users hardware/os data and then use that to create a key.

View 1 Replies

VS 2010 Generate Image Path From Unique Name, What To Do With Invalid Chars

Apr 15, 2010

I'm creating a radio streaming application, which plays a live stream from various radio stations in a small 'gadget' like application.

The user can add his own custom radio stations, by supplying a Name, a StreamUrl and, optionally, an Image that represents a logo or something of that radio station.The logo will be drawn on the main form when that station is selected.

I need to be able to save these custom stations, and I think it makes sense to use an XML file, which could then look something like this

<CustomStations>
<Station>
<Name>Radio 1</Name>

[code]....

Before I added the support for images, this worked fine, how to store the images. I want the user to be able to select any image from his harddrive, but I don't want to force him to keep that image in the same location afterwards. So I can't rely on the path that he selected. Instead, I want to simply load the image from the path he selected, and then save it somewhere else.

I am storing the XML file in the common application data path which I think is a good place for the images too.The problem is, how to determine a name for the images? I will always have just one image per custom radio station, so it makes sense to me to simply have one Images folder that holds all images, with a unique name.I can see two solutions:

1. Generate a random filename for every image

2. Use the Name of the radio station as the image name

For option 1, I suppose I could just create a string of 16 random characters and call that the filename. The problem of course is that there is no guarantee that I will get a unique filename. Yes, the chances of generating the same name twice randomly are very tiny, but it's still possible, and I just don't like that. How can I ensure that my random filename is unique? I suppose I could always drop the whole thing in a While loop that continues when the new filename already exists, but there must be a better way... Is there nothing in the framework that allows me to generate a unique random filename, in a directory of my choice (so not in the Temp directory...)

I like option 2 much better. The Name of a radio station is unique (there can't be two stations with the same name), so I don't have to worry about filenames conflicting. The problem with this approach is that there are no restrictions on the name. There's nothing stopping the user from naming their custom station "Radio~/aij!""_.fe" or something like that, which is obviously not a valid filename... So, I will have to do 'something' to generate a valid filename from the station name. I could simply remove all non-valid path characters from the name, but then I am no longer guaranteed a unique filename... Suppose there's two stations, one called "Radio/1" and one "Radio1", then after removing the invalid "/" character, the names will be the same and so I will generate the same image path for both....

View 8 Replies

VS 2010 - Make A Program That Generate 3 Codes To A Word Document And Adding A Prefix

Oct 2, 2010

I want to make a program that generate 3 codes to a word document and adding a prefix before each code

Example:
TextBox1.Text = 355855026164242
TextBox2.Text = 40324003
TextBox3.Text = 58458844

Want these codes to go to document like this:
IMEI:355855026164242
Code1:40324003
Code2:58458844

View 5 Replies

VS 2010 System.Security.Cryptography - Generate An HTPASSWD File For Server To Secure A Directory

Apr 10, 2012

i wanna generate an HTPASSWD file for my Server to secure a directory. For Crypt im using DesEncrypt Method , here is my Code :

[Code]...

View 4 Replies

Generate A "internal Compile Error" In VB 2010 Beta 2?

Nov 9, 2009

This piece of code generate a "internal compile error" in VB 2010 beta 2. Is the begin of a ODBC program test using a MySQL database. Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn As ADODB.Connection = New ADODB.Connection("DRIVER={MySQL ODBC 5.1 Driver};" &
"SERVER=localhost;" &
" DATABASE=dbmysql1;" &
"UID=root;PWD=ranger; OPTION=3")
End Sub
End Class

View 2 Replies

Asp.net - Generate The API Of Site?

Apr 15, 2011

How to generate the API of my Site ... www.volvobusesindia.com so that i can provide my site API to agents so that cthey can vbook tickets using our API ?

i want the bus booking search box appear in the site will be displayed in others website ?

View 2 Replies

Automatically Generate A Key?

Feb 1, 2012

I am writing an encryption application that requires a 64 bit key. I am currently using the following code to automatically generate a key.

Function GenerateKey() As String
' Create an instance of a symmetric algorithm. The key and the IV are generated automatically.
Dim desCrypto As DESCryptoServiceProvider = DESCryptoServiceProvider.Create()

[code]....

I am wanting the user to create their own key. Can I convert a user defined password (a string) into a 64 bit key that can be used?

View 1 Replies

Generate A Tone In .net?

Nov 20, 2009

I want to build a kind of a tone generator to tune my Ukulele (NERD allert, sorry for that).I know there are enough tone generators available but since a Ukulele has only 4 strings and not in the same order and tone as a regular guitar, they won't help me. My objective; to build a small VB.NET form with four buttons and every button will generate a specific tone.I've already tried Console.Beep etc [URL] but all I hear; no beep.As seen on the page at this link: QuoteThe Beep method is not supported on the 64-bit editions of Windows Vista and Windows XP.As far as I know, I'm not running a 64-bit Windows Vista, however, I'm running on a 64-bit processor.

I've tried Google (one of my best friends, but we seem te be in a separation?) but all I can find are examples in C# (since it is about music, C# is a regular tone, however I don't know anything about C# as a programmers language...) and the examples there are in VB.NET are about extreme big applications like digital piano's etc.

View 14 Replies

Generate A Unique ID?

May 12, 2006

I want to generate a unique ID in VB.NET that starts with ASXXXXX where XXXX represents a number. The number has to start in an orderly fashion. This ID will then be stored in a SQL Server express table.

View 8 Replies

Generate Images On The Fly In ASP.NET?

Apr 8, 2009

how can generate (and display) images on the fly for simple charting, resizing etc?

View 3 Replies

Generate MD5 And SHA1?

May 26, 2011

I'm using the below function to generate an MD5SH1 hash for SQL backup files.This works well, has progress report etc but is slow if using large files.

Could I generate the MD5 at the same time as SH1 rather than having to process the file twice, doubling the time taken? What about converting an MD5 result to SHA1?

Imports System
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text

[Code]...

View 1 Replies

Generate Reports In VB?

Sep 20, 2010

I am a beginner in VB.NET. I have made a small project and now i would like to make some reports to complete the project.

how i can work with reports in VB.NET. I want to retrieve data from SQL Server 2000 using Stored Procedures and generate a report in VB.NET.

View 1 Replies

Generate Sample XML From XSD

Jun 3, 2009

Is it possible to generate the sample xml(Used as Request xml for web service)from the xsd using vbscript code?

View 4 Replies

How To Generate A Pdf File

Aug 24, 2009

i would like to generate a very simple report with some images and text and i am wondering if there is a way to generate a pdf file with vb.net?

View 4 Replies

How To Generate A Sequence

Jan 25, 2010

I'm very dumb in vb.net or any .net languages. Actually while I was creating a package using SQL Server Integration Services, I had a problem. This problem can be solved using VB.net script.

Here is my scenario
I've a database table like this
ColA ColB ColC

[code].....

View 3 Replies

How To Generate Matrix

Oct 23, 2009

I want to generate a matrix (7,4) with this output: (7lines and 4 columns) that has this structure(with this values)Column A1 and row B1 has 2 values (1 8 ), column A2 has 2 values (2 7 value in column A2) , column A3 has 3 6 value column A4 and row B1 has 4 5 value. And so on.How I can generate this matrix: [code] So my question is which condition to put to generate this matrix of this form.A cell A1,B1 contains two values (1 and 8 for example in cell B1).

View 1 Replies

How To Generate The Formula

Apr 1, 2009

how to generate the formula. want to use arraylist to store and for loops to loop the formula til the system can detect which staff it should giv the ticket to..below is the scenario:this is a helpdesk system..so each ticket they submit muz be auto assigned to a staff to attend their ticket..each staff has a different quota..so i came out wid this algorithm on hw to determine who the ticket shld go to..

for ex: i set one ticket's quota is 7%

staff A's quota - 47% staff B's quota - 35% staff C's quota - 18% so to knw how many tickets A get den B getx 1 ticket and how many tickets B get den C gets 1i came out wid a calculation like this -

Staff A - 47% / 7% = 6.7(max no.of tickets he can receive foe a period of time)
Staff B - 35% / 7% = 5
Staff C - 18% / 7% = 2.5

so first i compare A&B whr i took 6.7/5 = 1.3 -> so every 1.3 ticket A gets,B gets 1 ticket den i compare B&C whr i took 5/2.5 = 2 -> so every 2 ticket B gets,C gets 1 ticket i wanna implement this concept in my code..but i dunno how to come up wid this formula..

View 14 Replies

ListView - Any Way To Generate ID Per Row?

Sep 8, 2011

All I want is to generate an ID to my listview per row it is possible? For example I have 10 records in listview and I want to add an ID per row in randomly... Here's my sample picture... but it's wrong...coz' at the column 3 it's a repeating ID...

View 1 Replies







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