01-13-2025 09:19 AM - edited 01-13-2025 09:28 AM
I need to record a signal from a photodiode at a specific time interval. For that photodiode will be connected to a DAQ, as an initial step a basic code was created where input from the DAQ is simulated using the simulated signal function. The problem I am facing is that I need to store data in an array and output it as a text file, but when I run the code when the code is executed data is stored in the correct position but while doing that previous value changes to zero. I want to get all the data from 10 run in a single array.
Solved! Go to Solution.
01-13-2025 10:19 AM - edited 01-13-2025 10:27 AM
Hi Guy,
you need to learn some LabVIEW basics, like shift registers!
And you need to learn to avoid DDT wires as much as possible!
@UV_Vis_Guy wrote:
I want to get all the data from 10 run in a single array.
Use an auto-indexing output tunnel!
01-13-2025 10:22 AM
@UV_Vis_Guy wrote:
when I run the code when the code is executed data is stored in the correct position but while doing that previous value changes to zero. I want to get all the data from 10 run in a single array.
Yes, you send in an array of 10 0's and replace 1 value x 10 loops.
01-14-2025 07:59 AM
Hai GerdW,
Thanks for your valuable comment but auto-indexing is not working, when I enable auto-indexing for the output array it is asking to create a 2D array and the final output does not have all the values.
Regards,
Jefry
01-14-2025 09:38 AM
A shift register is all you need.
01-14-2025 10:00 AM - edited 01-14-2025 10:03 AM
Hi Guy,
@UV_Vis_Guy wrote:
auto-indexing is not working, when I enable auto-indexing for the output array it is asking to create a 2D array and the final output does not have all the values.
I don't think you are right!
Maybe you should learn more LabVIEW basics?
And no, you don't need any shift registers (and InitArray and ReplaceArraySubset) for such a simple task! (Sorry, Yamaeda! 🙂 )
Btw. I recommend NOT to use ExpressVIs excessively. Their DDT wires prohibit you from becoming a better LabVIEW programmer…
01-15-2025 02:30 AM
@GerdW wrote:
Hi Guy,
@UV_Vis_Guy wrote:
auto-indexing is not working, when I enable auto-indexing for the output array it is asking to create a 2D array and the final output does not have all the values.
I don't think you are right!
Maybe you should learn more LabVIEW basics?
And no, you don't need any shift registers (and InitArray and ReplaceArraySubset) for such a simple task! (Sorry, Yamaeda! 🙂 )
Btw. I recommend NOT to use ExpressVIs excessively. Their DDT wires prohibit you from becoming a better LabVIEW programmer…
You're right, but i was thinking of the minimal change to get it working. 🙂
01-15-2025 04:11 AM - edited 01-15-2025 04:13 AM
@Yamaeda wrote:
You're right, but i was thinking of the minimal change to get it working. 🙂
Minimal change, he? 😀
Instead of a DDT to Number we use a shift register, initializer constant, and insert into array!
If you don't watch out, Christian might promote you for the Rube Goldberg thread. 😋
But in your defense you can say that the use of Express Nodes and DDT datatype are the even bigger Rube Goldberg solution.
01-15-2025 06:42 AM
@rolfk wrote:
@Yamaeda wrote:
You're right, but i was thinking of the minimal change to get it working. 🙂
Minimal change, he? 😀
Instead of a DDT to Number we use a shift register, initializer constant, and insert into array!
If you don't watch out, Christian might promote you for the Rube Goldberg thread. 😋
But in your defense you can say that the use of Express Nodes and DDT datatype are the even bigger Rube Goldberg solution.
🙂 Sometimes i wonder at which level i should answer questions. Sure, we can throw Actor Framework at the problem, but if they're having issue with some basic concept i like to start with just that and let the rest be bad (but maybe point it out), they'll probably be overwhelmed with information otherwise. But it depends on the mood of the day. 🙂
01-15-2025 09:33 AM
@Yamaeda wrote:
🙂 Sometimes i wonder at which level i should answer questions. Sure, we can throw Actor Framework at the problem, but if they're having issue with some basic concept i like to start with just that and let the rest be bad (but maybe point it out), they'll probably be overwhelmed with information otherwise. But it depends on the mood of the day. 🙂
I know the feeling. How far to go? Try to fix the mess with minimal modifications or cleanup seriously? The first approach will result in more and more requests to fix yet another problem they run into because the initial setup simply was borked from the start, the latter requires usually a lot of extra explanations, that they may not even be able to process at all with their level of knowledge.
Whatever you do, you often end up with someone who keeps running into problems and depending in everything on you and the rest of the community to get anything done.