Click here to Skip to main content
15,914,013 members
Home / Discussions / C#
   

C#

 
AnswerRe: Let Windows service OnStop() wait longer Pin
Vijay Selvaraj26-Aug-12 22:00
Vijay Selvaraj26-Aug-12 22:00 
QuestionSystem.Drawing.Pen-type property does not expand in property grid Pin
TetheredSun22-Aug-12 22:51
TetheredSun22-Aug-12 22:51 
AnswerRe: System.Drawing.Pen-type property does not expand in property grid Pin
Eddy Vluggen23-Aug-12 1:12
professionalEddy Vluggen23-Aug-12 1:12 
GeneralRe: System.Drawing.Pen-type property does not expand in property grid Pin
TetheredSun23-Aug-12 1:34
TetheredSun23-Aug-12 1:34 
GeneralRe: System.Drawing.Pen-type property does not expand in property grid Pin
Eddy Vluggen23-Aug-12 1:43
professionalEddy Vluggen23-Aug-12 1:43 
GeneralRe: System.Drawing.Pen-type property does not expand in property grid Pin
TetheredSun23-Aug-12 1:46
TetheredSun23-Aug-12 1:46 
GeneralRe: System.Drawing.Pen-type property does not expand in property grid Pin
Eddy Vluggen23-Aug-12 2:04
professionalEddy Vluggen23-Aug-12 2:04 
QuestionSerialPort open, but receive no response Pin
LionAM22-Aug-12 21:11
LionAM22-Aug-12 21:11 
Hello,
I am trying to communicate with a Cognex data matrix scanner which is connected to the PC via USB, emulating a COM port. I can open the connection and send commands to the scanner (which is reacting on the commands), but I do not receive any data from the port.

For getting started, I used an example from the MSDN
(http://msdn.microsoft.com/de-de/library/system.io.ports.serialport.aspx[^]) which I simplified and adjusted for the device:

C#
// Create a new SerialPort object with default settings.
_serialPort = new SerialPort();

//Set connection parameters
_serialPort.PortName = "COM4";
_serialPort.BaudRate = 115200;
_serialPort.Parity = Parity.None;
_serialPort.DataBits = 8;
_serialPort.StopBits = StopBits.One;
_serialPort.Handshake = Handshake.None;
_serialPort.NewLine = "\r\n";

// Set the read/write timeouts
_serialPort.ReadTimeout = 500;
_serialPort.WriteTimeout = 500;

_serialPort.Open();


I also tried to use the DataReceived and the other events - but also no response. I wrote a small C++ app to use the Win32 api directly but no response either. I downloaded several example applications - but still no response.

The scanner, however, works with the manufacturer application - I therefore downloaded the trial of "Advanced Serial Port Monitor" to see the communication. Interestingly, with this program I am able to communicate with the device and to receive data as expected - but I don't know what is different...

Alex
AnswerRe: SerialPort open, but receive no response Pin
glennPattonWork322-Aug-12 22:28
professionalglennPattonWork322-Aug-12 22:28 
GeneralRe: SerialPort open, but receive no response Pin
LionAM23-Aug-12 1:17
LionAM23-Aug-12 1:17 
GeneralRe: SerialPort open, but receive no response Pin
glennPattonWork323-Aug-12 1:33
professionalglennPattonWork323-Aug-12 1:33 
GeneralRe: SerialPort open, but receive no response Pin
LionAM23-Aug-12 22:59
LionAM23-Aug-12 22:59 
GeneralRe: SerialPort open, but receive no response Pin
glennPattonWork323-Aug-12 23:28
professionalglennPattonWork323-Aug-12 23:28 
Questionc# Pin
shailendra1315@gmail.com22-Aug-12 19:34
shailendra1315@gmail.com22-Aug-12 19:34 
AnswerRe: c# Pin
Roger Wright22-Aug-12 19:48
professionalRoger Wright22-Aug-12 19:48 
AnswerRe: c# Pin
Abhinav S22-Aug-12 20:21
Abhinav S22-Aug-12 20:21 
GeneralRe: c# Pin
OriginalGriff22-Aug-12 20:25
mveOriginalGriff22-Aug-12 20:25 
GeneralRe: c# Pin
Abhinav S22-Aug-12 20:28
Abhinav S22-Aug-12 20:28 
AnswerOT Pin
Keith Barrow23-Aug-12 3:04
professionalKeith Barrow23-Aug-12 3:04 
QuestionHow do you offload a Dictionary? Pin
Xarzu22-Aug-12 14:36
Xarzu22-Aug-12 14:36 
AnswerRe: How do you offload a Dictionary? Pin
Wes Aday22-Aug-12 14:46
professionalWes Aday22-Aug-12 14:46 
AnswerRe: How do you offload a Dictionary? Pin
Niladri_Biswas22-Aug-12 17:36
Niladri_Biswas22-Aug-12 17:36 
AnswerRe: How do you offload a Dictionary? Pin
OriginalGriff22-Aug-12 20:24
mveOriginalGriff22-Aug-12 20:24 
AnswerRe: How do you offload a Dictionary? Pin
Abhinav S22-Aug-12 20:29
Abhinav S22-Aug-12 20:29 
QuestionTaskFactory AutoResetEvent DeadLock on Window Service Pin
d87c22-Aug-12 14:14
d87c22-Aug-12 14:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.