Hello,
is there any possibility to make a setup for the two generator outputs to create a fixed and defined phase relation? When I try the APP, I can create phase relations which seem to be shifted to any angle, but the result when I do so (by dejusting one of them to a slightly different frequency and then at a time back to the same frequency as the other generator output) seems to be random somehow and I doubt if this phase relation will be stable forever. To controle via console doesn't provide a phase declaration either, just channel amplitude frequency <type> only.
The goal for this application is to generate a tranducer signal and a rectangle signal for a synchronized rectifier respectively a lock-in amplifier. The phaseshift between thos two should be fixed and adjustable.
Is there a way theoretically in general?
Dieter
Fixed phase relation between the two generators signal
-
- Posts: 115
- Joined: Fri Jan 09, 2015 6:07 pm
- Location: Babenhausen/Germany
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Fixed phase relation between the two generators signal
Hi Dieter,
The internal architecture of the AWG guarantees that the phase relation between the two channels remains constant indefinitely, when both channels generate the same frequency.
The AWG also makes it quite easy to generate two signals with a defined phase relation. Program both channels with the same waveform, frequency etc., set the start offsets into the array of samples to appropriate values (ie reflecting the desired phase difference at the target frequency), start both channels simultaneously and you are done.
Unfortunately, neither the scope+gen app nor the generate utility offer a way to start both channels at the same time. You'll need to modify the software to do that. Or use the monitor command line utility to write to the AWG's control register directly, but that would be awkward.
Cheers
Nils
The internal architecture of the AWG guarantees that the phase relation between the two channels remains constant indefinitely, when both channels generate the same frequency.
The AWG also makes it quite easy to generate two signals with a defined phase relation. Program both channels with the same waveform, frequency etc., set the start offsets into the array of samples to appropriate values (ie reflecting the desired phase difference at the target frequency), start both channels simultaneously and you are done.
Unfortunately, neither the scope+gen app nor the generate utility offer a way to start both channels at the same time. You'll need to modify the software to do that. Or use the monitor command line utility to write to the AWG's control register directly, but that would be awkward.
Cheers
Nils
-
- Posts: 115
- Joined: Fri Jan 09, 2015 6:07 pm
- Location: Babenhausen/Germany
Re: Fixed phase relation between the two generators signal
Hello Nils,
thanks for the response. I thought already about such a way, although my command line knowlegde is not that experienced yet. But I will try to get through it.
In the meantime I found a different method: I used the possibility to load oscillation data into the buffer in the scope&generator-APP, where both oscillations represent the wanted phase shift to eachother. So far, so good. But in fact to avoid the random phase relation, I have to trigger the system externally. And if I want to have a free oscillating system, there is a need to trigger channel 2 by channel 1 i. e. Unfortunately the external trigger input (DIO_0P) prefers a CMOS level of about 3.3 Vpp, totally shifted into the positive range, while the generator's output just provides 2 Vpp symmetrical at maximum. With a combination of 2 resistors and one capacitor the trigger can work, but an active buffer would be more proper.
By the way I am just writing a small article for the magazine ELEKTRONIK PRAXIS, featuring RedPitaya as a possibility to manage complex measuring tasks. And the focus should be on its hardware capabilities.
Dieter
thanks for the response. I thought already about such a way, although my command line knowlegde is not that experienced yet. But I will try to get through it.
In the meantime I found a different method: I used the possibility to load oscillation data into the buffer in the scope&generator-APP, where both oscillations represent the wanted phase shift to eachother. So far, so good. But in fact to avoid the random phase relation, I have to trigger the system externally. And if I want to have a free oscillating system, there is a need to trigger channel 2 by channel 1 i. e. Unfortunately the external trigger input (DIO_0P) prefers a CMOS level of about 3.3 Vpp, totally shifted into the positive range, while the generator's output just provides 2 Vpp symmetrical at maximum. With a combination of 2 resistors and one capacitor the trigger can work, but an active buffer would be more proper.
By the way I am just writing a small article for the magazine ELEKTRONIK PRAXIS, featuring RedPitaya as a possibility to manage complex measuring tasks. And the focus should be on its hardware capabilities.
Dieter
-
- Posts: 115
- Joined: Fri Jan 09, 2015 6:07 pm
- Location: Babenhausen/Germany
Re: Fixed phase relation between the two generators signal
Hello Nils,
I found the script RedPitaya_HDL_memory_map, where all registers are described. I am missing a little bit some example syntax, especially for the ASG managing. For instance it is possible to identify
that this could be the trigger source for the oscilloscope as 8-arbitrary wave generator application positive edge. But how to define scale and offset for the ASG after
Dieter
I found the script RedPitaya_HDL_memory_map, where all registers are described. I am missing a little bit some example syntax, especially for the ASG managing. For instance it is possible to identify
Code: Select all
monitor 0x40100004 0x8
?Ch A amplitude scale and offset
and then? I have no glue. As I said some significant examples would be helpful to understand and to apply the right syntax.monitor 0x40100004 0x4
Dieter
-
- Posts: 115
- Joined: Fri Jan 09, 2015 6:07 pm
- Location: Babenhausen/Germany
Re: Fixed phase relation between the two generators signal
Hello Nils,
now I understand the meaning of the document -- I have to identify the right bit numbers and set them. The
monitor 0x40200004 0x3fff0000
would set the offset of channel A to a very extrem value. But still, there is no effect up to now on my RP. Maybe there are some other registers to setup first.
Some more tests ...
Dieter
now I understand the meaning of the document -- I have to identify the right bit numbers and set them. The
monitor 0x40200004 0x3fff0000
would set the offset of channel A to a very extrem value. But still, there is no effect up to now on my RP. Maybe there are some other registers to setup first.
Some more tests ...
Dieter
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Fixed phase relation between the two generators signal
Hi Dieter,
Since offset and amplitude share the same register, writing 0x3fff0000 would set the offset to 0x3fff and the amplitude to 0x0000, so I'd expect a flatline output at the max positive offset. The monitor utility always writes the full 32 bits.
Have fun experimenting,
Nils
Since offset and amplitude share the same register, writing 0x3fff0000 would set the offset to 0x3fff and the amplitude to 0x0000, so I'd expect a flatline output at the max positive offset. The monitor utility always writes the full 32 bits.
Have fun experimenting,
Nils
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 97 guests