01-22-2024 05:00 AM
Hello!
I am retrieving measurements in 1 Hz speed, and I only need to send out an analog signal at the rate of 1 Hz.
However, i need to process the input with time and some other values at a rate of 10 Hz.
Only way I get to process the values is by setting the in and out to 10 Hz aswell which is too fast for the hard ware.
Our supplier suggest difficult workarounds that are hard to get to work.
Is there somebody that has solved this?
Thank You really much in advance!
Best regards
Robert
01-22-2024 09:20 AM
Hello,
I will go out on a limb and assume you want to read input data at 10Hz and output at 1Hz. You can separate the two processes by writing the input result to a global variable and reading out the result using a different rate. Use the Global Variable Write and the Global Variable Read modules. Set the analog input to USB-xx Device - Input HW time base set to 10hz. This is the rate at which the global variable is updated. Set the Global Variable Read module to use the DASYLab time base set to 1Hz. This is the rate of the data sent to the analog output. Ensure that the Analog Output module is set to use the DASYLab time base and that the Output in Real Time is disabled.
Best regards,
John
01-22-2024 09:39 AM
Thank You very much John
Actually im also reading the input at 1 Hz, but the data needs to be processed at 10 Hz, it can be for example calculating a compounding integral from the input and some other factors over time whereas the resulting product is outputted to the output again at 1 Hz only.
Can the output and input be set to 1 Hz and the calculation/processing set to another higher rate (10 Hz) without getting a mismatch?
Thanks a lot already, I understand Your good advice in Your first solution.
Best regards
Robert
01-22-2024 11:00 AM
There is no mechanism to set a module to run faster than its input data.