473,626 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access equipment through Serial Port

Hello all,

I have written a console program which is used to send and
recive data from a machine. I have used the HyperTerminal
to check the machine and get the wanted result. But my
program cannot get anything even though the port setting
is the same as HyperTerminal. Firsty, the machine must get
the operation signal, i.e. 3 characters(e.g. ABC). And
then the machine receive 2 bytes numerial(Hex) input
($010C) and return unfixed length of result to computer.
So I send 3 ascii code of characters to the machine, and
then i use 'byte' for the input in my program. Is
HyperTerminal pre-set some settings that i am not realize?
or my implementation is wrong. Thank you for anyone.

Stanley
Nov 15 '05 #1
1 2108
Hello Stanley,

You should probably post a code snippet to demonstrate how do you read from
the COM port.
I'm afraid your question cannot be answered without these details.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Stanley Wan" <st**********@s inatown.com> wrote in message
news:06******** *************** *****@phx.gbl.. .
Hello all,

I have written a console program which is used to send and
recive data from a machine. I have used the HyperTerminal
to check the machine and get the wanted result. But my
program cannot get anything even though the port setting
is the same as HyperTerminal. Firsty, the machine must get
the operation signal, i.e. 3 characters(e.g. ABC). And
then the machine receive 2 bytes numerial(Hex) input
($010C) and return unfixed length of result to computer.
So I send 3 ascii code of characters to the machine, and
then i use 'byte' for the input in my program. Is
HyperTerminal pre-set some settings that i am not realize?
or my implementation is wrong. Thank you for anyone.

Stanley


Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
12748
by: Chris | last post by:
Here's the situation: I work at a scientific institution and I have a portable electronic device which is used to take measurements. The device produces a very small amount of numerical data, about 10 to 15 numbers per measurement. This operation is performed frequently and I would like to implement an automatic solution that moves this data across a windows network and into the fields of an Access database application. The device...
2
13173
by: willie | last post by:
Hi, I'm writing a program which requires the use of three serial ports and one parallel port. My application has a scanning devices on each port, which I can access fine with pyserial. However, I'm unsure of how exactly I should be designing the program, I thought I could use threading to start class: class scanner(Thread): def __init__(self,port):
13
4814
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have been told it is not possible to access the serial ports from asp.net. The application is used to control custom hardware. The hardware is connected to a PC through serial ports. Our customer wants to control the hardware from a remote...
12
8616
by: david.brown.0 | last post by:
I'm trying to make a Java program access a parallel port. Java's comm API does not provide me with the control I need. I need to be able to write to the data and control pins and read the status pins. Any Java people know a good solution? I'm trying to use JNI and create my own library, but building the library gives me these errors: ld: warning: cannot find entry symbol _start; defaulting to 0000000008048094 ParallelPort.o: In...
4
17803
by: Frank | last post by:
Hello, how to get information about all serial ports in the PC? I use the following code, but i got only the data of the FIRST serial port. All other serial port information are not available with this code sample: ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from WIN32_SerialPort");
5
55753
by: Lee | last post by:
I am getting this error trying to run a win forms .net app using the .net 2.0 serial port control. This occurs when the app tries to open the port. I knwo this is some type of security access problem but I have no clue where to fix it. Help....
38
9645
by: shussai2 | last post by:
Hi, I am trying to access Serial Port in XP. I am using Dev-C++ IDE that uses Mingw as a compiler. I just want to know how I can open up serial port on COM1 and write some data. I have searched quite a bit over the web and could not find anything useful. I don't want to use Visual C++ or Cygwin, linux, etc. If any of you guys have some little tid bit of code that would be great to look at.
13
6189
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I am sending a short message to a group of embedded boxes daisy chained via the serial port. When I send a 'global' message, all the connected units should reply with their Id and Ack in this format '0 Ack' To be certain that I didn't miss a...
19
7005
by: Coastie | last post by:
Good afternoon- There is a table with the following fields: PK*, Equipment_ID, Battery_Serial *= arbitrary primary key Each piece of equipment has between 0 and 3 batteries, and each battery has a non-sequential serial number. Unfortunately, this creates multiple records for each piece of equipment. I want a query that consolidates the information onto a single line for each piece of equipment. The fields I need are: Equipment_ID,...
0
8262
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1507
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.