LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize AI and AO with making the offset voltage active

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

Download All
0 Kudos
Message 1 of 6
(2,644 Views)

Any help would be greatly appreciated:smileyhappy :

0 Kudos
Message 2 of 6
(2,603 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 6
(2,597 Views)

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

 

0 Kudos
Message 4 of 6
(2,586 Views)

Any help would be greatly appreciated:smileyhappy :

0 Kudos
Message 5 of 6
(2,559 Views)

Hi khalid,

 

why did you continue that discussion with a different user account here?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,531 Views)