05-10-2024 09:28 AM
Could anybody help me out with this problem?
General tasks within the top loop:
- Add a state to the Type Definition of machine states in which values are read from a file.
- Modify the Event structure such that it contains the following events to change the
machine state:
o START, RESET, WRITE values/data to file, READ data from written file, STOP.
- Some events might not be complete, therefore make adjustments. Currently, the event
structure halts/pauzes the program until an event is triggered. Change the timeout such
that the program continues its operation even when we do not trigger an event.
- Search and connect with an Arduino. When the Arduino is found and connected, light up
the “Connected” LED. Edit the “SearchArduino_SubVI”, so it outputs the answer to the
question: Is the Arduino connected? (did we not receive an error).
- Read all the information provided by the Arduino and combine the readings to maintain
a history of data points. (see additional requirements)
- Ability to write the received values, which are formatted in the bottom, to a .csv file
located in the same folder as main VI. Wait at least 1 sec. in this state.
- Ability to read the written .csv and show the values in the “ValuesFromFile” array. The
latest/newest value should be given at the top (index=0). Include a state delay of 1 sec.
The bottom loop will do the following:
Converts the 100 latest received string values (array) to an array of doubles called
"RecValues". It contains the latest values and in reversed order such that the newest
value is located at index 0.
- Creates a Histogram Distribution of the received values using 5 intervals for the
distribution.
- Calculates the overall average.
Creates a Waveform Graph containing the latest received data points and the moving
average. The number of values shown is given by the control "ChartSize".
o Note: calculate the average at each index/position within the 100 received
values array, resulting in an array containing the moving average(s).
Subsequently take the array subset of size “ChartSize
Additional Requirements:
1. Your solution should not have additional wait/delays other than requested or given. Do
not change the provided waits/delays.
2. Within the machine state where Arduino data is read, "Received" must contain the raw
(string) received data, up to the last 100 readings. Older readings should be removed.
"LatestVals" is a string array of the latest 100 received values. This variable is a crucial
link with the bottom loop, where the data is converted and filtered into graphs.
3. Create your solution in LabVIEW 2023Q3 or a new version.
4. COM port (VISA Refnum) is selectable within the Front Panel.
05-10-2024 09:59 AM
Do your own homework (it won't help you to learn LabVIEW if you submit something that you obviously didn't do yourself). When (if?) your code doesn't work, post it (all) here and ask for help in understanding why it isn't working. You should submit the entire Project, and because many of the "older" LabVIEW developers don't have the most recent versions, you should "Save for Previous Version" and specify LabVIEW 2019 or 2021 (which most of us can open).
Bob Schor