06-11-2016 06:52 PM
Hi,
Thanks for your advice. I am new to labview. So if you could just point out my wrong practises that would be great. But could please be specific on what you mean by the wiring of my block diagram? I checked the tutorial you were talking about but still couldn't actually find what you really meant. Also , i was using index waveform to index out channel 0 and channel 1 out of the combined waveform coming from the DAQ. So doesn't the index waveform vi take out the specific channel waveform outs of the combined waveform coming from the daq assist.
I have attached my block diagram for you to look at and let me know my wrong practises. Thanks. WIll appreciate your help.
Sachet
06-11-2016 08:38 PM - edited 06-11-2016 08:39 PM
Here is a small section of code like you had shown with some things marked up.
One function is overlapping the loop. The wires marked with the arrows have the data flow running from right to left. You want to try to make it left to right.
HIt the Cleanup Diagram button on the toolbar and it will help a lot.
Also many of the labels on terminals on you block diagram seem to be missing such as the Y arrays. The labels are technically visible, but something is wrong with their font making them seem non-existent. Pick the labels on them and hit Ctrl-4 to assign them the current font.
I've gone ahead and fixed things and hit block diagram cleanup. I also made it so the block diagram terminals do not show as icons. That is my personal preference because the icons eat up too much space.
Next up, you neaten to organize the front panel better. Many of those arrays are hitten behind other controls.
06-11-2016 09:13 PM
Hi
Many thanks for your effort and time. I will go through your modifications and once and will let you know if i have any further queries. Besides that, is there any other bad practises i have in this block diagram?
Since you have already gone through my diagram . I wanted to make clear about the motive. My main motive in this block diagram is to read strain from two channels simultaneously. But my strain gages have some overshoot that i need to correct for both the strain gages. That is why i was using shift register to take the average of the overshoot and subtracting the data everytime by the average overshoot.
After that i have merged two filtered signals into one and sent it to consumer loop for writing in the excel file. Is the way i have done, right???
Thanks once again.
Sachet
06-16-2016 12:33 PM
Hi,
Thanks for your help. Now i am trying to take the moving average of the filtered waveform data so as to smooth out by data. Well i could find one of the examples of moving average in ni site but it was an example of elements or the arrays only . But in my case its the waveform signal i have as data instead of array . I have attached my VI as well as NI moving average example. The Ni moving average example is what i intend to do to my filtered waveform signal.
Could you please have a look on it ?
Note: Attachment
1. Screen shot of part of my program highlighting the portion which i have added from the national instruments moving average example so as to merge with my program.
2. Is my own vi or program written to read two channels at the same time .
3. NI instruments moving average example.
Thank you for your time and effort.
Sachet
06-16-2016 12:49 PM
There is a broken run arrow, and several broken wires in your VI. So you will need to at least fix them.
I don't often like to recommend Express VI's. But there is one that would work for you here. The Filter Express VI has an option for a "smoothing" filter, and it uses moving average. It works on the blue dynamic datatype wire. The blue wire actually somewhat hides the underlying data that is going through it, but a waveform (an an array of waveforms) are among the real datatypes that the blue dynamic wire can actually transfer.
06-16-2016 12:54 PM
Hi, Thanks for your quick response. Below here attached is my good program where i want to do moving average of the filtered waveforms from both of the channels separately. Also, like the example of ni thats what i exactly intend to do in my program too.
Thanks.
Sachet
06-16-2016 02:30 PM
Signal Processing >> Waveform Conditioning >> Filter. Drop that Express VI and configure it for moving average.
Or, if you have the Advanced Signal Processing Toolkit, look for TSA Moving Average.vi