Send A Tare Command To A Weighing Scale Through Rs 232 Using Serialport Control

Aug 27, 2009

i am developing an application which needs to connect to a weighjng scale throug rs 232 and capture the output. after inserting the record however the pc needs to send the tare command to the weighing scale in order to set the scale to zero. now he tare character as far as i guess ia T i sent the command like this

serialport1.write(chr(27) & "T" & chr(13) & chr(10))

View 1 Replies


ADVERTISEMENT

Reading Data From Weighing Scale

Nov 14, 2010

I have a digital weighing scale I need to connect to the PC using RS232 communication port. Every time I weigh an object, automatically the result/ weight will display in the the texbox control in Visual Basic Application.I use to receive data via a timer for continuous looping sequence output to a textbox. Things do goes bad, as it flicking all the way. I using a indicator from AD series which read data from load cell of a truck weight bridge. It there's any way to stop this flicking without effecting the continuous loop?

View 3 Replies

Reading From A Weighing Scale Using Multithreading?

Sep 14, 2009

i trying to do a app, this app need to take reading from the weighting scale via bluetooth. but my problem now is that the reading from the weighing scale do not come in dynamic way. meaning to say that the value in the textbox will change base on the weight on the weighing scale.

View 2 Replies

Capture Weight Of A Mettler Toledo Truck Scale Using Serialport

Aug 31, 2011

I got a code online to read via rs232 using serial port ,the code uses readExisting() to get the data(im geting data form a MettlerToledo scale connected at com3,9600,8,N,1)problem now is that i change it to ReadLine() but it captures the weight once and i need the weight updated all the time!

View 1 Replies

Stop The Serialport.write Command To Send "0D 0A"?

Oct 10, 2009

I am using Visual Basic 2005 and Serialport class. My target device is a WinCE 5.0 Emulator.When I send bytes using serialport.write(byte(),offset,count), the serial port always output "0D 0A" between the bytes and after the bytes sending complete. like this:34 0D 0A A5 5A 0D 0AHow to stop ouput the '0D 0A"? It seems like a terminator "", I have tried to search the serial port settings but cannot find the proper setting. The seiral port is 19200, no parity, one stop bit, 8 bits.

Imports System.IO.Ports
Imports System
Imports System.Windows.Forms

[code]....

View 6 Replies

SerialPort Object - Sending Command To Slave Device?

Jun 12, 2009

I am having a little trouble with the serialport object in VB2008. I have a program that will send a command to the slave device however the program will not read the data from the slave device. I know my computer is communicating with the slave device because in hypertem it has no problem. For example I send the word "AT" and I should get back a response of "OK",

View 9 Replies

VB2008 Send 00h To FFh In One Byte Using SerialPort

Feb 1, 2010

peoples The User of my application will enter Hexa values in text boxes (00h to FFh). I need to send these values through the serial port, but so that EACH text box with values 00h to FFh ONLY generate ONE transmitted byte, exactly the value placed in the text box.

Just found examples of this application in VB6, using the following command:

MSComm1.Output = (Chr(Val(txtText1.Text)))

In VB2008, you use the component "SerialPort", and one of the methods for transmitting data to the output buffer is "Write". So I did it this way:Dim As Integer ValHex

[Code]...

View 3 Replies

Save Data And Send To Serialport Periodically?

Oct 14, 2009

I have a program where I need to periodically save the data to a database (if the computer suddenly shutdown) and also send the same data to a serialport.Alla data that is going to be sent and saved resides in two classes.his needs to be done every 1/10s.What's the best way to manage this?

View 2 Replies

Send A Command To A Command Line And Then Submit The Command?

Apr 30, 2010

First let me say that I am not sure whether or not this should go in this section or the API section, and if it needs to be moved I apologize. My issue is fairly straight forward, but for some reason I cannot get it to work.

I am trying to send a command to a command line and then submit the command. I have been trying without success to get this to work in v2008 Express and v2010 Express, Here is the code I am trying to us:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String _

[Code].....

View 6 Replies

Receive Data From Serialport & Send It To Anthor Pc Running My Program?

Sep 3, 2010

how to recive data from serialport & send it to anthor pc running my program & resend to the same serialport on the other pc?

View 4 Replies

Using Psexec.exe From PsTools To Send A Command To A Remote System To Fire A Command

Mar 17, 2010

I am currently using psexec.exe from PsTools to send a command to a remote system to fire a command through a command prompt however I am finding that the shell I am doing does not seem to like the spaces in the path.

[Code]...

View 3 Replies

Send Command To Command Line From Windows Form Application?

Mar 11, 2010

I am trying to send a command to the external command line (cmd.exe) from the Windows form application that I'm writing in VB.NET (using VS2008).

I can only access the external program thru the command line (its not my program) and I must do so from a form app.

I am trying to use the following code. I am able to call a cmd.exe window, but I can't pass the command line my command.

Using mp As New Process
With mp.StartInfo
.FileName = "cmd.exe"

[Code].....

View 8 Replies

Getting Scale Values From A Comm Port Into A Richtextbox Control?

Apr 13, 2012

I am getting scale values from a comm port into a richtextbox control, now as long as the connections and the scale is working great scale readings continuously flow into the control all the time, however when the connections or the scale is turned of the label that displays the weight will give a message saying error.

After 5 seconds I want to be able to give the operator the choice to take scale readings manually. This is my code so far.

Private Sub tmScaleTimer_Tick(sender As System.Object, e As System.EventArgs) Handles tmScaleTimer.Tick
If rtbDisplay.Text.Length = i Then

[Code].....

how do I restart the timer if the interval has elapsed

View 1 Replies

Bug In Serialport Control When Using E - 8 - 2 Parameters?

Jun 16, 2011

We have been debugging a problem with serial communications with an embedded device on 115200 baud, Even parity, 8 databits and 2 stopbits. The problem: a lot of extra 0x00 are sometimes received from the serialport.

1) We build a real basic sample program that only handles the data exchange. It was completely build according the serial-port-vb.doc from msdn. It was build in vb.net 2010. So this was the most basic setup possible on the PC side. This simple tool clearly shows the datareceived event spitting out extra bytes.

2) We used a scope to look at the hardware bits/levels. No problems / differences seen between good and bad messages. No extra bytes visible that the serialport event send to our programm.

3) We tapped the serial communication and received no wrong data on the tapping system but still on the .net tool. Again the serialport datareceived event gave us many extra 0x00 bytes.

So our only possible conclusion is that there is a problem in the serialport component from .net. My question: Are there any know issues? Can I get in contact with a microsoft engineer?

View 9 Replies

VS 2005 SerialPort Control

Aug 21, 2009

I'm working on application which uses SerialPort Control to send/receive commands to/from microcontroller.

Here is the basic

CODE:

I maybe missing something because the reaction of microcontroller very accidential! I mean, sometime it works from the first click and sometime from the third... I must make a number of clicks until it reacts back!

View 1 Replies

Working With SerialPort Control?

Nov 9, 2009

output.gif?I've just upgraded to Visual Studio 2008 and have been given a project and getting gps string from a radio via the serial port. I used a program called "SerialWatcher" and it monitors the data coming in from the radio. It works perfectly. When I tell it the port and settings, click Open, I get consistent output. Here is an example of the data that I got:

<NUL><STX>$PKLDS,124043,A,3337.8562,N,08418.8077,W,000.0,146.5,091109,,00,101,2190,80,00,*1C<CR><LF><ETX><STX>$PKLDS,124104,A,3357.1421,N,08403.0604,W,000.0,000.0,091109,3.0,W00,101,3003,80,00,*61<CR><LF><ETX><STX>$PKLDS,124128,A,3354.1213,N,08414.3434,W,000.1,274.3,091109,4.9,W00,101,2576,80,00,*64<CR><LF><ETX>

[code].....

The little icon symbol before the dollar sign is actually two symbols which I think are the <stx> and <etx>. I'm including a screenshot to show what they actually look like. From the output my program created all I would need is actually the last line. I can't really check for "length" because some data received by the radio will be half that length (or more than half). But there should always be a start and end (regardless of what is in the middle) I would think.

View 2 Replies

Communications :: SerialPort Timing Control

Feb 17, 2009

I am using VB2008 SerialPort to communicate with a device. My problem is, using RTS handshake I am missing the first 50 or 60 chars, after that everything is intact. I tried to change the buffer size - Has no effect, used standard, bigger, smaller and no change.

The device timing says when it sends CTS signal, it will start listening 100ms after that. I have no clue how to delay the write to test this. Should I first write to the buffer then write to the port after a a 100ms timer event?

View 3 Replies

SerialPort And Control Updating In MDI Form?

Mar 2, 2012

i am receiving data from serial port and i update a richtextbox in a MDI Form with the control.invoke method

(Code in SerialPort.DataReceived Event)

If myTerminal.Visible Then
myTerminal.MyRichTextBox1.Invoke(New MethodInvoker(Sub()
myTerminal.MyRichTextBox1.AppendText(dataLine & vbCrLf)
End Sub))
End If

But as a mdi form it has the ability to close and reopen. So when the serialport is sending data to richtextbox and the user click the close button and the form gets disposed. Then the error "Invoke or BeginInvoke cannot be called on a control until the window handle has been created."...

View 1 Replies

Read A 12 Byte Hex String (RFID Tag ID) Using SerialPort Control?

Apr 23, 2012

I'm trying to make an application that can read a 12 byte hex string from the serial port and display it into a text box, the source is a RFID module that is connected to my USB port using a RS232-USB converter.My first problem was accessing the text box in the datarecieved event due to invalid cross-threaded operation. Upon googling that, I copy/pasted the code I needed to get it work, these are all the cross threading functions.The OpenPort function and Datarecieved event are my own code, the rest I got off google. The application then worked, but I would get an incomplete code, the first swipe I would get all 12 digits, and at every other swipe, the first byte would vanish. Upon some more reading, I decided to make an array, the size of the incoming data (shown in the code below), but now I get the cross-threading error again.I know there's something wrong with the way I'm using the array. This is way beyond my VB knowledge, and I'm in o I'm an electronics engineer and self taught myself a little programming to create some apps for my hardware.Updated code:

Public Class Form3
Dim msg As String
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

[code]....

View 1 Replies

Receive Data From Weighing Machine?

Apr 14, 2010

i want receve the data from weighing machine through vb.net coding and how to get data from weighing machine

View 1 Replies

Send Keys To A Control On My Form - SendKeys.Send NullReferenceException

May 9, 2012

I am trying to send keys to a control on my form. But I am getting a NullReferenceException and I don't know why. The code is about as basic as it gets: [Code] The error reported is object reference not set to an instance of an object but Send is a shared method so doesn't need an instance. Strangely if I ignore the error it works fine and F4 is passed to the control. I know there was an issue with sendkeys and UAC but I thought this had been solved (I am using 4.0 framework).

View 1 Replies

DOS Net Send Command Use In VB?

Oct 18, 2011

I use below code to run DOS command Net send through VB code but not work I need help to solve this problem Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

View 1 Replies

Send The Command In Hex?

May 24, 2010

I am new to programming and VB.. so go easy my buffer is about full :) I am trying to talk to a box with serial port and only need to send the command in hex. here is the protocol for the device and my code below it to turn on the box. I am not calculating/sending the correct checksum because if I sniff the string being sent to the box from another piece of software that comes with it I get 04 1C 01 DF (spaces put in for clarity) and it works. my code produces 04 1C 01 21..

View 17 Replies

AT Command To Send Scheduled SMS?

May 25, 2012

Is there any AT Command to send Scheduled SMS from PC via GSM Modem?

View 1 Replies

Can't Send Command Using Pop3?

Jun 3, 2012

my problem is i can't send command using pop3 in vb.net every time i try to send its nothing happen but i can connect in tcp client server and server reply +ok when i connect

View 10 Replies

Send A Command To A Server?

Jul 28, 2009

how to creat a client and a server and pass text between them (like a messenger), and it works just fine

so my question is : how do I send a command to the server, for example, open a program (like notpad) or do tasks or search the remote pc or even shutt it down??

note that am not trying to make a trojan or anything like that, I have two pcs and I was just wondering how to do it ?

View 3 Replies

VS 2008 Send Key's Command?

Mar 17, 2009

i have a textbox that my mouse double click's on so it highlight's the text and i need it to copy that text

sendkeys.send({^+C})

i know it's something like that but it's not working for me i just need to send ctrl+c to copy it and i dont know the code's

EDIT> k someone gave me the code it's
System.Windows.Forms.SendKeys.Send("^c")

now i need the space key what is the code for it i tried this and it dident work

SendKeys.Send("{SPACE}")

View 7 Replies

Get USB Control For The USB Port Communication? Like The SerialPort Control For The COM Port

Jul 17, 2009

Do someone know if there is a\\ USB control for the USB port communication? like the SerialPort control for the COM port.

View 2 Replies

Delay The Execution Of The Send Key Command?

Apr 16, 2012

I am trying to delay the execution of the send key command. In VB script, it was relatively easy:

obj.sendkeys "{enter}"
wscript.sleep 1000
obj.sendkeys "{tab} {tab}"

When I do it via VB express, it is clumping the code together. For example

Threading.Thread.Sleep(5000)
SendKeys.Send("enter was entered ")
Threading.Thread.Sleep(5000)
SendKeys.Send("double tab was input ")

Instead of pausing for 5 seconds, typing the keys then pausing for another 5 seconds, it pauses for 10 seconds and then immediately types the input. I tested this on notepad.

How do I replicate the sleep feature in VB script into VB? There appears not to be a sleep feature in VB Express 2010

View 5 Replies

Send A Command To Another Instance Of My Program In Net?

Jan 12, 2010

I have a program that needs to see if it is already running and if so bring the other instance to the front and then close itself. Now I figured out how to see if another instance of the program is already running using GetCurrentProcess, but how do I tell the first instance to "BringToFront" from the second instance?[code]...

View 3 Replies







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