spcm_dwSetParam_i32(hDrv,SPC_CARDMODE,SPC_REP_STD_SINGLE);//Single mode is used. Refer to the other modes in manufacturer's documentation (i.e. sequence mode)
spcm_dwSetParam_i32(hDrv,SPC_MEMSIZE,*lMemsize);// Set the memory block size
spcm_dwSetParam_i32(hDrv,SPC_LOOPS,1);// Only a single pulse is transmitted. The number can be increased further
spcm_dwDefTransfer_i64(hDrv,SPCM_BUF_DATA,SPCM_DIR_PCTOCARD,0,pvData,0,8**lMemsize);//Here we get the pulse data from the fortran code to write into the device memory.
spcm_dwSetParam_i32(hDrv,SPC_M2CMD,M2CMD_DATA_STARTDMA|M2CMD_DATA_WAITDMA);//Device handles the rest but we need to tell the DMA operation. Please check documentation for the details.