VB2008 SeiralPort Communication With RS232?

Jun 20, 2010

At the moment, I need to write a simple peice of software using VB.

I have a computer with VB2008, a RS232 interface; a electronic scale with RS232 interface; a cable with two female sides(this cable is file transfer cable, it enable data transfer between two computers according to the instruction)

My task is to connect the scale to the computer and the computer will keep track of the data sent from the scale.

how to get started? I'm new to VB and have no background in seiral communication, please give details.

My first question is: I have connected them together with the cable, how can I make sure they are really conected (able to communicate)? And can anybody give a peice of code to let me start building on that?

View 3 Replies


ADVERTISEMENT

Minimum Development Environment Required For RS232 Communication?

Feb 16, 2011

I have just started using VB.net, and am currently using VB2010 Express. Previously in VB6, I used the MSCOMM control for communicating via the serial port.

1) What is the minimum development environment required for RS232 communication? I assume VB2010 Express will not be sufficient.

2) What control or class should I use?

View 3 Replies

VB In A Laptop Through USB Port And A USB-RS232 Converter To Communicate With A Microprocessor Using RS232 Protocol

Oct 18, 2010

I have developed a microprocessor based devise. It can communicate with laptop through RS232 as a VB application. Now most of laptops have USB port only. So I want to use USB replacing RS232 port on laptop side but not change anything on the device side. Can I do this using a USB-RS232 converter? How to change the VB software?

View 1 Replies

HEX Value Transfer Through RS232?

May 4, 2011

I am trying to connect a PC with peripherals thru RS232.The PC program has to send and receive value in HEX to peripherals.However, the value sent out seems to arrive at peripherals in ASCII.Following is two of my trial codes:

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim HexArray(8) As Byte

[code].....

View 4 Replies

Read Data From Rs232?

Dec 4, 2009

My program connects via the rs232 port to a pump and it managed to start the communication and sending data. But the problem arises when i try to read the return signal from the pump to pc. This is the piece of code i've used:

Code: Dim returnbyte(0) As Byte Dim ByteIndex As Integer = 0
Do While ClassSerialPort.BytesToRead <> 0 ReDim Preserve returnbyte(ByteIndex) returnbyte(ByteIndex) = ClassSerialPort.ReadByte() ByteIndex = ByteIndex + 1 Loop

[code]....

I obtain the following results:

Code:... 6 12 0 0 0 92 ...

From the manual i understand which byte to read. For e.g 6 = ACK. The problem is how to interpret the 4 bytes together in a string for e.g 0 0 0 92 means 9.2ml ?Is there any way to read the decimal point?

View 2 Replies

Send Commands RS232?

Jul 26, 2010

I have downloaded the vb script and it works as it should, its a program where you have some buttons so that you could trigger the relays.But i need several small scripts, one for each relay on / off so that i can call them from a .bat file with argument.i have a .bat named relaycard and in thet i have created argument like

relay1on
relay1off
relay2on
relay2off
and so on.

The small program relay1on should just do the jobb and then close itself.Maybe its a little bit clearer now.On the link that i posted there is a manual and even links to the vb program,

View 27 Replies

VB 8 Program To Communicate With RS232?

Aug 31, 2009

I chose Visual Basic 8 as a computer interface to communicate through RS232 (serial) to my microcontroller, which in turn will do its own thing to transmit data it receives from the VB GUI through wireless

I have used VB before but it's been a long time. I looked at some of the settings and it looks like it has a SerialPort com component I can use. Will it suffice for this project?Might be a simple question, but just want some tips from experienced developers.

View 11 Replies

Communicating Via RS232 - Dll / Delphi Win32 Exe?

Sep 23, 2011

I have a Delphi program that communicates with a vb.net dll that I created. The vb.net dll communicates with a Fluke scope meter via an RS232 connection. I have created a program that communicates correctly via RS232, giving me the anticipated value. Though, when I package this up as a dll and access the dll from my Delphi program I always receive a value of "1", rather than the value I was expecting (most cases a value in and around 240).I know that my delphi program is definitely communicating correctly with the dll and that my dll is definitely communicating with the scope meter

Here is my vb.net code:
Public Interface IFlukeComm
Function GetReading(ByVal Command As String, ByVal PortNum As Integer) As String

[code].....

View 1 Replies

Communications :: Hardware ID For RS232 To USB Adapter?

Apr 28, 2010

How can I get the port name (COM6 for example) for a given hardware ID, such as USBVid_04d8&Pid_1234, and vice versa? I'm using an RS232 to USB interface.

View 6 Replies

Hooking The Comm Port (RS232)?

Nov 2, 2011

I currently have software that sends out plain text(i.e. 'X') to comm 1 port and was wondering if there was any way to capture that plain text and also respond to that port on the same compute as the port without having anything plugged into the machine (i.e. 9 pin serial cable). I am trying to avoid buy any more hardware as this is an objective to acutally cut down on hardware.

View 1 Replies

Read A Packet Of Data Which Has Come In From RS232

Jan 10, 2010

I am trying to read a packet of data which has come in from RS232. I need to be monitoring the port until data comes in to be actioned. I have been doing this fine for some time using the following code:

Dim strline As String = Nothing
Dim comPort As SerialPort
Dim bIsOpen As Boolean = False

[Code]....

The code above works without a problem unles byte 1 or two are greater than 127. Basically, all of the characters that are not converted seem to be 128-255.

I am using VB 2008 express. Clearly I need to read each byte individually and store it as a byte within an array instead of a string but i am not sure how to do this.

how to get around this either through reading bytes properly or through using a different encoding format

View 13 Replies

Send / Rcv Msgs Using GSM Modem RS232

Mar 20, 2012

I am using a GSM modem RS232 where a sim is inserted. I want to write a VB.NET application so that i can send or rcv messages using the modem. How to proceed for same?

View 2 Replies

VS 2005 How To Read From RS232 Port

May 2, 2011

I have been using VB 6.0 and new to VB.net (VB 2005) I want to know how to read characters from RS-232 port.

I have created serialport object and want to read this sort of thing "A,2451.3955,06715.8253"

View 8 Replies

VS 2008 Reading Data Via Rs232

Apr 6, 2012

i would like to know a method that can read data via rs232 ( i use pic 18f452 to send 5 values(pression, temperature, current, voltage and solar radiation ) of Adc conversion )i successed to read one value at first ( sending one value via pic) , but i couldn't read more than one at end

so, question is how to do that ? how to separate between the data?

[Code].....

View 8 Replies

.net - Connecting RS232 With Visual Basic 2010?

Dec 5, 2011

Possible Duplicate: Creating a Serial Port in code in VB.net

I wanna connect RS232 to vb in order to set an input for motor such as the steps and motion. I'm really new with VB. I'm using VB2010 express. Can you help me with the coding?

View 1 Replies

Connecting RS232 With Visual Basic 2010?

Feb 10, 2012

Possible Duplicate: Creating a Serial Port in code in VB.netye. I wanna connect RS232 to vb in order to set an input for motor such as the steps and motion.

View 5 Replies

IDE :: Serial Port Communation Using Usb To Rs232. In Collage

Mar 18, 2011

i have some code here that is used for a project, the code is used in visual basic 6 and i am using visual studio 2008 in the project i have to communicate with a PIC micro controller, i do not know what to do because in visual basic 6 w use MS comms and in visual studio 2008 uses a serial port thing code below.[code]

View 3 Replies

Read / Write Data From RS232 Port?

Aug 23, 2010

I need to write and read data from a RS232 port. On the RS232 port there is a RFID Card reader-Writer connected. So I need to send hex codes to the device, and have to poll every 1sec if there is a card in the system. If there is a card I need to read the info that is on the card. My biggest problem is I think is that I am not sure how many characters there will be in return after the read command (maybe it is always the same length this I am not sure). What is the right way to read-write to the com port. So I always got the same result and not skipping a code.

View 12 Replies

Read Incoming Data From RS232 Port?

Sep 28, 2011

I want to create an application in VB.net that will read data outputted by a RFID reader on serial port.I want to know how will my application be able to identify the interrupt generated by Serial port and will read data from there?

View 2 Replies

RS232 - Sending And Receiving Bit Data To The Machine ?

Jun 11, 2011

Does anyone knows how to program using vb.net with rs232 module?, all i know is that i should use a compolet, but i can't understand a thing regarding the sending and receiving bit data to the machine..

View 1 Replies

Rs232 - Slow Baud Rate And Not Supported

Jun 24, 2010

im using VB 2008 and been trying to use the RS232 at 5 baud and setting the baud to that rate seems to go ok but when put in pratice it seems way to quick and doesnt work. I put that down to its to slow baud rate and not supported. I only want to send 1 byte so tryed it manualy by this ........

[Code]...

View 7 Replies

Send/receive Messages Via RS232 From Programme?

Jul 14, 2010

how to send/receive messages via RS232 from my programme. I have a USB-serial adaptor

Can anyone recommend any places to look? Is this something that you would expect would be fairly easy to do for someone with a few months of coding practice?

View 2 Replies

Sending And Receiving Data To RS232/MSComm A VB6.0 App?

Sep 14, 2009

I am developing an application which is pretty much a replacement of a hyperterminal. I am trying to send commands to the serial port using MSComm in VB6.0 When I type in on the hyperterminal h003128 I get a response OK. Or when I type in i003 it displays back some values.

What I am trying to figure out how do I send the h003128 via VB6. I believe I've undertood how to send data to the port. It seems I am not getting the correct formate. This wont work.. the formate iAAADDD where i = i AAA = 003 and DDD = 128 MSComm1.Output "i003128"

View 3 Replies

Communications :: RS232-USB Converter - Send Data To Microcontroller

Mar 13, 2009

I have a problem regarding rs232-usb converter... I'm using toshiba laptop. The problem i faced is i can receive data from my microcontroller to VB but i cant send data to microcontroller... However, when i use the same VB code and same converter, i try at my friend laptop (other brand), it works... May i konw is there any other setting i need to set for my laptop??

View 3 Replies

Create A Program That Sends & Receives Data Via Rs232?

Apr 15, 2010

I need to create a program that sends & receives data via rs232. I have done it many times in VB6 with easy.

Why is so hard in vs2008?

I managed to send (or so I think). Because I can see the LEDs flashing on my board connected to the pc. But I do not get any response back from the board.

The reason I do it in vs2008, is because I need the program to run on a PDA. But to understand how rs232 works in vs2008, I just created a simple program for the pc to talk to my board.

for example, I send:

SerialPort1.Write(Chr(2) & "I" & Chr(3)) and I expect back (into a textbox), a hex string 25 characters long.

The board also send data to rs232 sometimes, without me requesting it.

View 6 Replies

Get Info From A Scale Using An RS232 Cable Into A VB2010 Program

Oct 28, 2010

So I am trying to get info from a scale using an RS232 cable into a VB2010 program. But before we even start talking about that, I don't know ANYTHING about serial ports. I need to learn how to get the data from the scale without programming first... I am using Win7. I do have a sample program (w/ source) I downloaded [URL]) It runs without any errors, then I have a big USER error, what do I push? How do I tinker to figure out the right settings on this interface? or any interface. These are the sittings for the scale: [URL] I am considering returning my scale and getting something with maybe USB on it, I need to be able to weight things up 100lbs, I am shipping car parts.

View 8 Replies

Make A Program In Vb 2008 To Real All The Data Rs232?

Mar 12, 2012

Somebody know how I can read data from a device connected rs232?Im write it in a text box?

View 4 Replies

Read All Data From Serial Port (Com1 / RS232)

Nov 2, 2009

I am trying to make a program in vb 2005 to real all the data from a device connected on Serial Port (Com 1).i did this: [code]and this is how i want to reciveit.when i lounch the program i only receive first line "410001+00000001" and after that i get on the device rs232 error.

View 6 Replies

Read Data From RS232 Vith VB And Export It To Excel?

Sep 3, 2009

ome simple program that can send simple .txt file over RS232 to another PC, read this .txt file and export to excel.

View 2 Replies

VS 2010 - Sequence Of Commands To RS232 - How To Sure Command Is Received

Dec 20, 2011

I write in VB2010, the software should work with the external hardware via RS232, the thing is when I send a command to the external hardware I have to wait for a reply from the device that command was received, just after I got the answer I want to continue send another command, I have a long sequence of commands i'm supposed to send, but I need to know for sure that the commands were received before I go on to the next command. I did the following code, but I think the code is not effective, because sometimes I do not get an answer and then the whole sequence commands destroyed. Maybe you can help me optimize the code? [Code]

View 1 Replies







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