VS 2008 Control Laser Via Serial Port?

Mar 23, 2011

I have created a laser that can be controlled via the serial port. I've written the code to switch it on/off and it works fine. How do i make it strobe? Here's the code to switch it on, to switch it off is similar (don't ask why it is like this...i think it's the transistor from the circuit board that switches the signal):

[Code]...

View 4 Replies


ADVERTISEMENT

VS 2008 Writing Some VB2008 Code To Control Four 7-seg LED's / Serial Port Control?

Nov 10, 2010

I'm writing some VB2008 code to control four 7-seg LEDs I bought from Velleman. They came with some example code in VB 5.0, and with instructions telling me to input 5 bytes at a time in the format Chr$() & Chr$() & etc. for the rest of the 5 bytes. When I try to do this using VB2008, it rejects the $ sign, so I've tried it using the Chr() format, which VB2008 allows. However, it doesn't work. Is Chr() the new version of Chr$() or are they different entities? In sending data to the LEDs, I'm using LiveComPort.WriteLine() as my command. (My serial port is called LiveComPort) I also tried it with LiveComPort.Write() asthe command. I know that my serial port and the LEDs are working, because they respond to the demo program provided by Velleman.

View 7 Replies

VS 2008 Serial Port Control?

Nov 18, 2009

All these days i used to program in Vb6.0. Now since from last 15 days I have been using Vb2008. In Vb6.0 I used MSCOMM for serial communications. Here in Vb2008 I found Serial port control equivalent to it. I somehow managed to learn how to send data using serial port control and set parameters like baudrate , stopbits , etc. But I' not getting how to get the received data. In VB 6.0 we used to use comEvReceive in OnComm event and used MSCOM1.Input to get the received data. But I'm not getting how to do the same in vb2008.

View 2 Replies

Reading Serial Port Read Data From Serial Port?

Aug 16, 2011

i am a absolute beginner and i want to use vb to receive data from micro controller through serial port using rs232 standards, i found this code to receive the data serially, can any one tell me where should i paste this code, so that the data received will be displayed in message box.Private Sub DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) HandlesSerialPort1.DataReceived

[Code]...

View 9 Replies

Serial Port Example Code - Connect To A Modem Thru The Serial Port

Oct 26, 2011

The link below has code to connect to a modem thru the serial port but it is for an earlier version of VB. when I convert the code, it does not fully convert and has 4 errors that prevent building the project. can someone tell me what needs to be changed or added?

[URL]

Note: the error: not CLS-Compliant

View 8 Replies

.ost File For Serial Port Control?

Dec 7, 2010

i trying to make a control for serial port to send a string "1" to serial port , but i don't want to use a form. I want to be able to save as .ost file or be able to input it into outlook 2003 macro to use as a script. can someone get me started on how to name, open, set, write to a serial port without using a form? just to use as a macro?

View 2 Replies

Any Way To Write Data To Serial Port To Control Toy Car?

Feb 6, 2012

I just need to write data to serial port to control a toy car
Moving left, right, forward, back.

View 2 Replies

Send A Control String From .NET To A Serial Port?

Aug 5, 2010

I am trying to send a control string from VB.NET to a serial port. I am using a pololu trex jr. on the receiving end of the serial port. I have attached a copy of my current code which compiles without errors, but fails to send data. I can tell that it is not sending data because I have a light on the control board connected to the port and it normally blinks when data is received. The program that came with the board drives it perfectly but does not serve the purpose I need it to. I am open to any suggestions as I eventually plan to write a class to contain the control routines.

View 12 Replies

Writing To A Serial Port Using Mscomm32.ocx Control

Jun 17, 2010

In my windows application I am using Mscomm32.ocx control for serial communication.

I set the control properties like below in the Form1_Load event.

AxMSComm1.CommPort = 1
AxMSComm1.Settings = "9600,N,8,1"
AxMSComm1.InputLen = 0

[Code]....

View 7 Replies

C# :: Read Serial Port Control Line States With .net?

May 10, 2011

I'm working on a project where I need to trigger an event when a switch is closed. It is my understanding that it is possible to use the control lines on a serial port and read whether the switch is closed or not. I've found a schematic of how to connect the switches to the pins, but I have not been able to find any example code on how you can read the state of the switches.

View 2 Replies

Using MSComm32.ocx Control For The Purpose Of Serial Port Communication?

Jun 16, 2010

In my application I am using MSComm32.ocx control for the purpose of serial port communication.
when i am using it I am getting a following error while writing data to the port.

"AxMSComm1.Output {"Exception from HRESULT: 0x800A018A (CTL_E_GETNOTSUPPORTED)"} Object "

I am writing the output to the port like below. AxMSComm1.Output ="Hello"

I mention the properties of the ocx control in the form load like below. AxMSComm1.CommPort = 1

AxMSComm1.Settings ="9600,N,8,1"
AxMSComm1.InputLen = 0
AxMSComm1.PortOpen =True

I searched for this error in the net.But I am not found any information for this issue.

can anybody explain why I am getting that error and how to resolve it???

View 5 Replies

Serial Port In VB 2008

Apr 9, 2011

I am trying to make my own hyper terminal. I have used the serial port component and after setting all the configuration for the com port I press the button Enable ComPORT. The problem is that, when I press the enable com port button the program goes unstable untill the reception starts from the COM port. After the reception is start the program starts working fine.

[Code]...

View 6 Replies

Access Serial Port In 2008?

May 25, 2008

[Code]...

m really not sure in here because this code is for vb .net 2003.. are they the same?

View 2 Replies

Reading Serial Port Using .net 2008?

Oct 2, 2011

I have microcontroller interfaced with serial port of my computer. In my microcontroller I have 2000 sample data and my primary target is to read those data. Now I can read those data in hyper terminal, but when it comes to my application it doesnt show anything.

Private Sub sp1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles sp1.DataReceived
sp1.Open()
MsgBox(sp1.ReadExisting())
End Sub

this simple code block should show me the data.But it doesnt.data format coming Microcontroller is in this following formate :

nitialization successful !,1023
Starting sampling process... 1023,1023 1023,1023
0,2 1023,1023 1023,1023 1023,1023 212,686 1023,1023 1023,1023
1,5 1023,1023 1023,1023 1023,1023,659 213,689 1023,1023 1023,1023

now, I dont understand why it doesn't read anything :NB: SP1 has a baudrate of 19200,Databits 8 and no parity,COM1 port. I aisnt sure whether I will be needing a buffer or not

View 1 Replies

VS 2008 Read Serial Port?

Jul 20, 2011

This code was published a few years ago by stanav. I have it reading my Com1 db9 port but having some issues.i have tried adjusting some timeouts, but then, it may just sit there.Jarbled Text - I should be getting results like "SOHEM709US17946US1114US62RST12345678920110714170301" etc., instead I am getting "3B?B?B?????99?F?F?3B?B?B?CAD?1???2?8?3?0??0?1?6"I/O Error - The I/O Operation has been aborted because of either a thread exit or an application request.

[Code]...

View 17 Replies

VS 2008 Serial Port Read?

Mar 11, 2010

I have written a sketch to an arduino board to send data to the serial port. How can I tell VB to only read from the serial port when data is sent to it? I have been using the timer.tick and tried to sink it with the delay I set in the arduino

View 2 Replies

VS 2008 : Serial Port And Index Out Of Range?

Aug 13, 2011

the program works fine but there is the possibility of a problem because this error message did pop up.I'm gathering my data bytes in an array --

dim rcvdata(19) as byte
serialport.read (rcvdata,0,20)
serialport.close

(Then decipher the array).But Should I go further with this? Could the error be related to my serialport.read?What if there were NOT 20 bytes read into the array?I think this may be it? I should poll the array for 20 bytes before proceeding?Yes? -- (It's a given and that's standard procedure).No? -- Don't worry, they're going to be there (the read will try again if it has to?) It won't proceed without the 20 bytes?

View 12 Replies

VS 2008 Connect A Photocell To Serial Port?

Apr 23, 2010

I'm trying design an aplication, who receive inputs from a Photocell omron.

I will connect this photocell at serial port, and it, when detect movement, close the circuit.

How can I verifi in the serial port, if the circuit is closed ou opened?

View 6 Replies

VS 2008 Serial Port - Data Type?

Aug 22, 2009

seems to be quite easy but i'm stuck I'm reading a hex string from serial port (f.e. 20FD05C4), but can't read it proper in VS:/ . I've been trying with serialPort.ReadExisting(), serialPort.Read, etc

Is there any way to just read that String or convert it easyly bin/hex ?

View 8 Replies

VS 2008 Serial Port Can't Get To Send Strings

Dec 8, 2010

I've set up two computers, with a null modem serial cable. When trying the connection in two Realterm windows it works ok to send strings.I'm trying to write a simple project that sends the timestring over the same port.One button sends the timestring. I've created one other sub "AppendLabel" that just updates a label.text so I can see what's happening.[code]

View 8 Replies

VS 2008 Serial Port Program Hogging CPU?

Feb 18, 2011

i have the following code which runs ok, but it hogs upto 95% of the CPU.program outline: a timer tick event = 1000ms scans through 30 readlines of data on the comport for a specific line of hex, and then extracts information from the next line and converts it to decimal for viewing on the screen.i've only included the main part of the code to try and keep it simple.

Public Class Form1
Private WithEvents serial As New IO.Ports.SerialPort
Public grab As String
Public cardIndex As Integer

[code]....

View 9 Replies

VS 2008 Serial Port Read RI Line?

Nov 3, 2011

Till drawer, connected to Com1, 9600,0,N,1 and a windows forms appThe drawer uses the RI line to show if the drawer is open or closed, but I cant find a way to read this line from the SerialPort control.. Been working on this for a while, but no dice!

View 4 Replies

VS 2008 Using Serial Port To Read String?

Jun 9, 2009

I have an application in Electronics to communicate with serial port. With using VB I have succesfully read a character using

Serialport1.ReadByte
or
Serialport1.ReadChar

[code].....

View 5 Replies

[2008] Serial Port Received Bytes Is Zero?

Mar 12, 2009

In my serial port application, I have my code -

Private Sub SerialPort_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort.DataReceived
Dim cnt2 As Byte

[code]....

For some packets I sent, "Error Data Received" came up. I checked BytesReceived, it was 0. My question is: since SerialPort_DataReceived processes data received, data was supposed to be received. Why the number of bytes I read was zero? BTW, when is this event accessed? it is accessed when any number of bytes received or the whole packet received?

View 2 Replies

Unable To Close Serial Port After USB / Serial Converter Disconnected

Mar 28, 2006

I have a stand alone VB.Net 2005 application that uses a serial port that generally stays open while the application runs on a Windows XP system. In trying to bullet-proof the UI, I ran into a problem when the USB to Serial Converter normally used to provide the serial port is disconnected while the serial port is open. In trying to handle the resulting error when accessing the port, I find I cannot close the port.

When trying to do so, the error message says something like "unable to close the port. You may not have sufficient permissions." Reconnecting the USB/Serial Converter does not reactivate the port.

[Code]...

View 8 Replies

Read The Data From Barcode Weight Scales By Serial Port And TcpIp Port?

Nov 27, 2010

I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port

View 7 Replies

Get FullName From Available Serial Port (Com Port) From Device Manager In Windows Form With .net?

Jul 25, 2011

I have a Windows form.in windows form have a combo box that give me a list of available port serial with it code (Dim ports As String() =SerialPort.GetPortNames())for example( Com1,Com8,Com15,...).but I want to give me fullname of serial port in device manager for example in dvice manager is these (Comunication Port(COM1) - Printer Port(LPT1) And USB Serial Port(COM8)).how to Get it?

View 2 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

VS 2008 Reading And Writing Data To A Serial Port

May 25, 2009

reading and writing data to a serial port. the settings for the port are correct (from manual of device):

[Code]...

View 1 Replies

VS 2008 Serial PORT - Operation Is Timed Out (use TIMER)?

Nov 4, 2009

"The operation is timed out " in use with timer and reading serial buffer.I read every 50msec (timer) serial buffer and when are not data in serial buffer, then VB2008 write "The operation is timed out" and program stopped.When are data in serial buffer, then is all OK.PLEASE what can I do, when I want NOT stop program, when are not data in serial buffer.I use this code in timer:

[Code]...

View 14 Replies







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