Skip to content
Snippets Groups Projects
Commit 6742bb07 authored by Berk Silemek's avatar Berk Silemek
Browse files

Update Console/Transmitter/Usage_Transmitter.md

parent 4e5894ac
No related branches found
No related tags found
No related merge requests found
# Programming the transmitter
The .c files programs the transmit cards. The script implements the functions for the m4i.6622 transmit functions. The ‘m4iset_8ch.c’ file initiates the card for 8-channel transmit operation using 400 MHz sampling frequency (297MHz output, please see the paper for the reasoning about transmit frequency selection [1]). For 123 MHz (3T). The sampling frequency can be changed to 625MHz. The main function is named ‘m4iset’ takes three arguments as follows:
```c
/**
* Set two m4i transmitter cards
*
* @param pvData 16-bit data pointer for the first transmit card (each card has 4 transmitter)
* @param pvData1 16-bit data pointer for the second transmit card
* @param lMemsize 32-bit memory length for the transmit data
* @Return void
*/
void m4iset_(int16 *pvData, int16 *pvData1, int32 *lMemsize)
{
drv_handle hDrv; //The instance of the first card
drv_handle hDrv1; //The instance of the second card
drv_handle hSync; //The instance of the star-hub
...
...
...
}
```
The Fortran codes implements the .c code and generates the transmit data. Therefore, the .c code and fortran code must be compiled first. For example,
```console
gfortran pex_m4i_8ch_CP.f m4iset_8ch.c /usr/lib64/libspcm_linux.so -o pex_m4i_CP
```
where pex_m4i_8ch_CP.f is the fortran routine m4iset_8ch.c is the code for card programming and libspcm_linux.so is the library for the m4i driver cards that needs to be pre-installed from the manufacturer's website. The name of the output file is pex_m4i_CP. To run the cards, this file needs to be used with two parameters
```console
pex_m4i_CP $mode $att
# The variable $mode determines the mode of operation. This can be either 0 or 1 as integer. The mode 0 prepares and transmits a composite pulse.
# The composite pulse is composed of 1 millisecond long signals. The 1 millisecond signals are subsequently transmitted for each channel.
# The second mode transmits a parallel transmit pulse that is generated based on a mode. The total power is normalized.
# The length of the pulse is approximately 1 ms.
# $att parameter adjusts the attenuation level for the output. It can take floating values between [0,1].
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment