Hi,
I'm still working on my test, and I still don't have a solution
I have adapted the MultiDeviceHardwareCompare_ErrorLocationsTClk CVI code.
As my data are sampled at about 100kHz I cannot export the sample clock using regular way (NIHSDIO_VAL_DDC_CLK_OUT_STR to Stobe for example). It returns an error because using this way, sample clock frequency must be not less than 20MHz!
So I use NIHSDIO_VAL_ON_BOARD_CLOCK_STR (internal clock) for all my devices, they both have a generation and an acquisition session to run.
1 I configure my generation sessions :
- On board Clocks
- exporting Start data event using PFx
- writing my stimulus and expecting pattern into device to use the hardware comparison mode
2 I configure the niTCLK synchronisation for all my generation sessions
3 I commit the generation sessions (mandatory befor initiating the acquisition)
4 I configure my acquisition sessions :
- Onboard Clock source
- Importing Start data event on Pfx
- Initiate acuqisition (will wait for the trigger)
5 I Initiate the generations sessions using niTCLK (or just niHSDIO_Initiate...)
Then I have the error : Resource requested by this session has already been reserved by a different session
How to do it?
I use niTCLK to synchronise my onboard clocks of the generation sessions.