From: Jaidev Deshpande on
How can I use MATLAB as a signal generator?

Eg. Can I generate a sine wave on MATLAB and through the serial port, use this signal as an input to an am-fm generator?
From: Stan Bischof on
Jaidev Deshpande <deshpande.jaidev(a)gmail.com> wrote:
> How can I use MATLAB as a signal generator?
>
> Eg. Can I generate a sine wave on MATLAB
> and through the serial port, use this signal as an input
> to an am-fm generator?

Not a Matlab issue, but you can't.

No software can send a sine wave through a serial port.
It is a serial port, after all.

Now if you want to use a serial bus to control external
hardware that can generate a sine wave, then sure that
is quite doable. The exact details would depend upon
the external hardware of course, but generally you
would set up the serial port parameters to match that
of your external hardware, then write commands from
Matlab to the external hardware.

If you really want to generate waveforms in Matlab
and see them in the real world you'll want an AWG.
Here you would upload a sampling of the waveform
to the AWG and it would generate the signal you want.

If you want realtime analog signals then you'll want
a sig gen and you'll be sending signal parameters
( freq/amplitude/etc.) rather than a sampling.

If your "am-fm generator" can accept controls
via serial then you'll want to check the programming
manual and find out what to send.

But in no case are you going to be sending a sine
wave through the serial port. Just doesn't work that way.

regards

Stan
From: Jaidev Deshpande on
Hey Stan

Thanks. Basically I need to generate a rectangular wave with 10% duty cycle and multiply / modulate it with a higher frequency sine wave.

Unfortunately the generators I'm using are too crude (and the modulator is not programmable either) to give me a reasonably accurate rectangular form, and therefore I'm looking for digital signal sources.

I will look into the AWG. I'll be grateful if you can offer more suggestions. Thanks a lot.

Jaidev
From: Pham Duc Dung on
If your "am-fm generator" can accept controls
via serial then you'll want to check the programming
manual and find out what to send.
---------------------------------------------------
[url=http://funwares.com/prostate-massage/]Prostate massage[/url]
[url=http://www.escortincontriitalia.com/Escort_Girls/Rimini/]Escort Rimini[/url]
From: Walter Roberson on
Jaidev Deshpande wrote:

> Thanks. Basically I need to generate a rectangular wave with 10% duty
> cycle and multiply / modulate it with a higher frequency sine wave.
>
> Unfortunately the generators I'm using are too crude (and the modulator
> is not programmable either) to give me a reasonably accurate rectangular
> form, and therefore I'm looking for digital signal sources.
>
> I will look into the AWG. I'll be grateful if you can offer more
> suggestions. Thanks a lot.

The only values that an RS232 serial port itself can emit are "high" and
"low", with nothing in between.

RS232 serial port signals are (for this purpose) defined as
asynchronous: there is no common clock between the two ends and the time
gap between the end of one signal and the beginning of the next is not
fixed.

Higher-speed computer serial ports often have an RS422 option; RS422
uses differential signalling and so does not even have a clear "high" or
"low", but supports higher speeds and greater distances.


"serial ports" as a generic class include synchronous DS0 and T1 lines
and IBM bit-level protocols (unfortunately the name escapes me at the
moment), but you are unlikely to find those supported on a modern
computer without a special card, and most of them would not be suitable
for producing a reasonable approximation of a high-frequency sine. You'd
be better off with a D/A converter.
 |  Next  |  Last
Pages: 1 2
Prev: Add a Title to a Legend?
Next: Equation Manipulation