space in rs232 output
space in rs232 output
space in rs232 output
space in rs232 output
space in rs232 output
space in rs232 output space in rs232 output space in rs232 output space in rs232 output space in rs232 output space in rs232 output space in rs232 output space in rs232 output
space in rs232 output space in rs232 output
space in rs232 output
Go Back  Xtreme Visual Basic Talk > > > space in rs232 output


Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2010, 08:08 PM
RobinGi RobinGi is offline
Newcomer
 
Join Date: Oct 2010
Posts: 1
Default space in rs232 output


when i run this pice of code

Dim TxArray(7) As Char

TxArray(0) = Chr(2)
TxArray(1) = Chr(4)
TxArray(2) = Chr(0)
TxArray(3) = Chr(78)
TxArray(4) = Chr(0)
TxArray(5) = Chr(1)
TxArray(6) = Chr(81)
TxArray(7) = Chr(255)

SerialPort1.Write(TxArray, 0, 8)

the output is
2 4 0 4e 0 1 51 FF (reading in hex format)

what i am after is for my output to look like
2404e0151ff

any suggestions on how to get the write function to not put in spaces ?
Reply With Quote
  #2  
Old 10-12-2010, 04:20 AM
PlausiblyDamp's Avatar
PlausiblyDampspace in rs232 output PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

How are you checking this output? Are you sure the spaces aren't just formatting as if they were part of the data stream I would have expected to see the code 20 between each character.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 11-10-2010, 09:36 AM
PaulP51 PaulP51 is offline
Newcomer
 
Join Date: Nov 2010
Posts: 5
Default

Try to put a semicolon( at the end of the write statement. I dont know if it's allowed but that you find out soon enough.
Reply With Quote
  #4  
Old 11-10-2010, 10:31 AM
PlausiblyDamp's Avatar
PlausiblyDampspace in rs232 output PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

This is Vb.Net, the semicolon would be relevant if it was a C# program.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
space in rs232 output
space in rs232 output
space in rs232 output space in rs232 output
space in rs232 output
space in rs232 output
space in rs232 output space in rs232 output space in rs232 output space in rs232 output space in rs232 output space in rs232 output space in rs232 output
space in rs232 output
space in rs232 output
 
space in rs232 output
space in rs232 output
 
-->