Loic VINET Posted March 22, 2023 Share Posted March 22, 2023 Hi I would like to know if it is possible to synchronize a trigger with the time of the computer. my trigger is set with dwf.FDwfDigitalInTriggerSet(hdwf, c_int(0), c_int(0), c_int(1 << channelTrigger), c_int(0)) then after dwf.FDwfDigitalInConfigure(hdwf, c_int(0), c_int(1)) I start the acquisition of the data with dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts)) How can I set a time in nanosecond coming for example in python with time.time_ns() with the time of the trigger? Ultimately, I would like to plot a signal and have the absolute time in x axis. Link to comment Share on other sites More sharing options...
0 attila Posted March 22, 2023 Share Posted March 22, 2023 Hi @Loic VINET The FDwfAnalog/DigitalInStatusTime returns the absolute time of T0. For AD2 this is software time. For ADP3X50 and newer devices high resolution device timer. Link to comment Share on other sites More sharing options...
0 Loic VINET Posted March 22, 2023 Author Share Posted March 22, 2023 Hi Attila Thank you for your answer I run this: while cSamples < nSamples: dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts)) dwf.FDwfDigitalInStatusTime(hdwf, byref(psecUtc), byref(ptick), byref(pticksPerSecond)) For the first iteration I had for example: psecUtc 1679507688 ptick 253 pticksPerSecond 1000 I'm looking for at least 10 ns precision, looks like I have ms precision Is it possible to get that 10 ns precision? another question, does it give me the time of the first item of the acquisition at the first iteration? Link to comment Share on other sites More sharing options...
0 attila Posted March 23, 2023 Share Posted March 23, 2023 Hi @Loic VINET On AD1,2 only software timer is available. The returned time stamp when FDwfAnalog/DigitalInStatus was last called. Link to comment Share on other sites More sharing options...
0 Loic VINET Posted March 23, 2023 Author Share Posted March 23, 2023 Hi Attila, I am using the device "Digital Discovery", what should I do or buy to have a 10 ns precision? Link to comment Share on other sites More sharing options...
0 attila Posted March 23, 2023 Share Posted March 23, 2023 Hi @Loic VINET Now I know you are using Digital Discovery. I'm adding hardware timer for this product. It will be available with the next software version. Link to comment Share on other sites More sharing options...
0 Loic VINET Posted March 23, 2023 Author Share Posted March 23, 2023 Hi Attila, Fine 2 questions: Do you have any idea when this new software version should be available? By new software, can you confirm you are talking also about the library cdll.dwf on windows or cdll.LoadLibrary("libdwf.so") on linux? This feature is ultimately very important to us 🙂 Link to comment Share on other sites More sharing options...
0 JColvin Posted March 23, 2023 Share Posted March 23, 2023 Hi @Loic VINET, The new software will be available when Attila (the developer of the WaveForms software) gets the opportunity to dedicate the time to create it (the new hardware design to load onto the FPGA and the corresponding WaveForms software to support/take advantage of the feature). He lives in Europe though, so it will be little while before he gets the opportunity to respond to part 2 of your question. My personal guess (as opposed to an official answer) as a somebody not involved with the development process for WaveForms would be that the update might be available by the end of next week (presuming that other priorities don't take over Attila's time). Thanks, JColvin Link to comment Share on other sites More sharing options...
0 attila Posted March 23, 2023 Share Posted March 23, 2023 Hi @Loic VINET 1. Hopefully tomorrow, after some testing around the other modifications. 2. Yes. Link to comment Share on other sites More sharing options...
0 attila Posted March 24, 2023 Share Posted March 24, 2023 Hi @Loic VINET For Digital Discovery it returns 1.25ns (DIO/DIN trigger) or 10ns (other trigger sources) resolution absolute time for T0. The resolution changes when the system frequency is adjusted, 1/(8xFreq) or 1/Freq. The timer is synchronized with the computer on software connection to the device (FDwfDeviceOpen). Loic VINET 1 Link to comment Share on other sites More sharing options...
0 Loic VINET Posted March 24, 2023 Author Share Posted March 24, 2023 Hi Attila, Thank you for it and for being so fast. I will test it as soon as possible, maybe not as fast as you. Link to comment Share on other sites More sharing options...
0 Loic VINET Posted March 24, 2023 Author Share Posted March 24, 2023 Hi Attila Well well well, it works: psecUtc 1679670100 ptick 418708162 pticksPerSecond 800000000 Thank you I will continue my tests with this new feature. attila 1 Link to comment Share on other sites More sharing options...
Question
Loic VINET
Hi
I would like to know if it is possible to synchronize a trigger with the time of the computer.
my trigger is set with dwf.FDwfDigitalInTriggerSet(hdwf, c_int(0), c_int(0), c_int(1 << channelTrigger), c_int(0))
then after dwf.FDwfDigitalInConfigure(hdwf, c_int(0), c_int(1))
I start the acquisition of the data with dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts))
How can I set a time in nanosecond coming for example in python with time.time_ns() with the time of the trigger?
Ultimately, I would like to plot a signal and have the absolute time in x axis.
Link to comment
Share on other sites
11 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now