02-09-2014 09:25 AM
Dear all,
I need help to solve my problem which about synchronize the input voltage with output. I am trying to write a code that can synchronize the output voltage ( to the actuator) with input voltage (from the sensor) with changing the offset voltage (Dc voltage) while the code is running.
I have tried to test the code by connecting the input with output voltage as can be seen in the attached figure.
I found there is a delay between generating a date and acquiring a data by (Fs* number of sample). For example, if i set the number of sample (10000 )and sampling rate (1000 Hz), the delay is 10 s. I need to improve the code where it can write and read simultaneously with changing the offset voltage (Dc voltage).
Could do you please help me to improve this code.
Khalid
02-10-2014 04:02 AM
Any help would be greatly appreciated:smileyhappy :
02-10-2014 04:31 AM - edited 02-10-2014 04:35 AM
Hi khalid,
For example, if i set the number of sample (10000 )and sampling rate (1000 Hz), the delay is 10 s.
Well: to get 10k samples with a rate of 1kS/s takes 10s. Just simple math!
What about reading just 100 samples with the same rate? This will only take 100ms…
02-10-2014 05:24 AM
Hi GerdW,
Thank you very much for your reply.
Actually, I need to synchronize the generator with the sensor to use this in the control system ( countrol The Dc Voltage). I need this to be fast as much as possible.if I change the Dc Voltage takes along time to acquire the signal.
Could you please help at this point to improve the code.
Khalid
02-10-2014 01:56 PM
Any help would be greatly appreciated:smileyhappy :
02-12-2014 02:41 AM