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
ADVERTISEMENT
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
Mar 20, 2012
I will use the Background Intelligent Transfer Service (BITS) to transfer files from a client (laptop) to a shared folder on a server within our local network.The problem is a very slow network bandwith, if we transfer a file, the other clients canīt work, all requests to other clients (application) or viewing internet pages needs a long time.My idea is to use BITS in my tool to copy/transfer a file from client to server, also I hope to get more performance for the internet requests.
View 2 Replies
Mar 9, 2011
I'm using server.transfer to transfer execution of a URL to a dummy page which fetches information from the database. The trouble is that the master page interacts with the session.
global.asax:
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires at the beginning of each request
If Not (System.IO.File.Exists(Server.MapPath(Request.Url.LocalPath))) And Request.Url.LocalPath.ToLower
[CODE]...
Master page:
If String.IsNullOrEmpty(CStr(Session("SessionId"))) Then
Session.Add("SessionId", Guid.NewGuid().ToString)
End If
Page declaration: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="utilityCMS.aspx.vb" Inherits="utilityCMS" MasterPageFile="~/MasterPages/main.master" EnableSessionState="True" %>
Web.config snippet:
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="HttpModuleAggregator" type="XPIdea.Web.HttpModuleAggregator,xpidea.web.common" />
</httpModules>
I'm getting an error :
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration.
I should also mention that this same master page works elsewhere in the site. Session is used throughout the site as well (not just in the master page).
View 2 Replies
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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