11-14-2013 06:27 AM
Please help, i need help with the following assignment, I am new to this and so I am pretty stuck:
This assignment is designed to work on a sampled TTL square wave of up to 100 samples stored in an appropriate array. The two logic states are represented by the following values:
A logic 1 (High) by a value of 5 + 0.5 (V).
A logic 0 (low) by a value of 0 + 0.5 (V).
Specification 1 (65%)
To design a VI that will identify every transition between either of the two states and calculate the number of Logic 1s as a percentage of the total number of samples.
The front panel will consist of the following:
An array of controls holding the sampled values.
An array of indicators holding the index values of where each transitions occurred.
An indicator holding the percentage of high values.
Hint: Research Build array and Initialise array functions.
Specification 2 (75%)
To design a VI that will meet specification 1 and can also be used as a sub VI in another VI. The sub VI should be fully documented, have its own icon and connector pane.
Specification 3 (100%)
To design a VI that will meet Specification 2 and will also be capable of detecting any errors that occur: i.e. samples that fall outside the permitted ranges. If errors are detected analysis should be aborted and the samples in error identified in an appropriate manner.
11-14-2013 06:51 AM
Start here. It'll get you very far.
11-14-2013 06:56 AM
Thanks for that...
But I am asking for help, not a solution! I am pretty stumped.
11-14-2013 07:27 AM
And what help are you asking for?
What have you done so far?
What hardware do you have?
What LabVIEW version do you have?
11-14-2013 07:38 AM
A point in the right direction, a starting point.
I was trying to do a paper trace but keep hitting a wall. I made an array but was unsure about which values should go into it. I was trying to find a way to identify the transitions but really am not sure how to do it. And then calculating the number of logic ones as a percentage of the total number of samples is a whole other story...
I am using a PC
Versio 8.6 of labVIEW
11-14-2013 08:10 AM
Shift Registers are your friend here. Use a shift register to keep track of your transition locations, another one for the number of 1s, and a third for keeping the previous state. By keeping the previous state, you can check to see if the previous state and the new state are different (a transition occurred).
11-14-2013 08:13 AM
Ok thanks, hopefully a start in the right direction 🙂
11-14-2013 08:23 AM
11-14-2013 08:25 AM
Thanks Jim, much appreciated.
07-08-2016 06:26 AM
thank you jim