Re: Serial Communication in Visual C++
- From: "Ben Voigt" <rbv@xxxxxxxxxxxxx>
- Date: Wed, 11 Oct 2006 08:44:15 -0500
"Ryan Neuhart" <ryan@xxxxxxxxxx> wrote in message
news:5oUWg.33628$iA5.24715@xxxxxxxxxxxxx
Right, I only initialize once. Sorry for the confusion on my part. I amReply copied from tools newsgroup since the discussion seems to be here:
running this through a simulation environment. Initially I had the time
step set to 0.02 sec, but realized that this may be too fast for the
serial connection. However, I get the same result when setting the time
step to as slow as 2.0 secs. Each step I write the following to the
serial port:
OutputVoltage = DesiredRPM * (1/183.9);
sprintf(buf,":CHAN1:VOLT %g",OutputVoltage);
g_SupTalk.Write(buf, strlen(buf));
Perhaps you need to send a carriage return character after the command so
the device knows it's the end of the command.... or something like that.
You can use PortMon from www.sysinternals.com to compare the traffic from
your app with Hyperterminal and/or Matlab.
.
- References:
- Serial Communication in Visual C++
- From: Ryan Neuhart
- Re: Serial Communication in Visual C++
- From: Carl Daniel [VC++ MVP]
- Re: Serial Communication in Visual C++
- From: Ryan Neuhart
- Re: Serial Communication in Visual C++
- From: Eric Hill
- Re: Serial Communication in Visual C++
- From: Ryan Neuhart
- Serial Communication in Visual C++
- Prev by Date: Re: FindFirstFile, FindNextFile to get files in the order of receipt
- Next by Date: Re: Serial Communication in Visual C++
- Previous by thread: Re: Serial Communication in Visual C++
- Next by thread: Re: Serial Communication in Visual C++
- Index(es):
Loading