473,503 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can i add Time stamp for serial port for sending data and receiving

1 New Member
I am able to Transfer data and files over serial port in c# , but the problem is i have to send the file in 500 ms can anyone suggest me how to send the file within time period and how to add time stamp

here my code for sending files
Expand|Select|Wrap|Line Numbers
  1.    private void butSendFile_Click(object sender, EventArgs e)
  2.         {
  3.             if (serialPort1.IsOpen == false)
  4.             {
  5.                 this.serialPort1.Open();
  6.             }
  7.             serialPort1.Write(System.IO.File.ReadAllText(this.txtfile.Text));
  8.         }
  9.  
  10.         private void butSetFile_Click(object sender, EventArgs e)
  11.         {
  12.  
  13.             OpenFileDialog ofd = new OpenFileDialog();
  14.             if (ofd.ShowDialog() == DialogResult.OK)
  15.             {
  16.                 txtfile.Text = ofd.FileName;
  17.             }
  18.         }
Feb 15 '17 #1
0 2363

Sign in to post your reply or Sign up for a free account.

Similar topics

4
9061
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
2
3453
by: Padu | last post by:
Hi, I know that the System.IO.Ports.Serial port event for receiving data (DataReceived) happens on a secondary thread, and that if there will be any interaction of that data with the UI, it...
6
2513
by: vipulagarwal.in | last post by:
hi i hav written a code in python to send an SMS from a nokia 3310 connected to my PC... i wanted to receive a msg on my PC. In order to do so, the PC must know when it has to read data frm the...
15
8168
by: xkenneth | last post by:
Hi, I'm writing a couple python applications that use the serial port (RS-232) quite extensively. Is there any way I can monitor all activity on the serial port and have it printed as the...
7
5359
by: davetelling | last post by:
I'm a newbie that is still struggling with OOP concepts & how to make things work they way I want. Using Visual C# Express, I have a form in which I added a user control to display a graph, based...
2
4290
by: pauland80 | last post by:
Hello, My soft passively listen to a device sending +- 300 bytes of data each second. After several hours of work, the soft abruptly stops receiving data without any error, (while the device...
1
1993
by: vtang | last post by:
Is there a way using PL/SQL script to update the time stamp of a CLOB data in a table? Basically we can download the CLOB file to local and update the content with new time stamp.
1
5759
by: sdbranum | last post by:
For those who have found it impossible to get help in communicating with Wasp's WDT-2200 Barcode Scanner through a COM Port, except by using their supplied DTComm software, I am presenting what I...
0
1497
by: neelsfer | last post by:
Has anybody perhaps have code to check the serialport of the PC(rs232) for data received from a a rfid scanner, and if its available, then populate it to a textbox on a form. i currently use 3rd...
0
7205
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,...
0
7093
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...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7353
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...
0
4689
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...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
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 ...
1
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
401
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...

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.