03-19-2024 06:00 PM
@crossrulz wrote:
...
3. You really should not be constantly opening and closing the log file inside of the loop.
I sometimes do that when I'm concerned about a crash and I want to make sure everything gets logged.
03-19-2024 09:07 PM
@paul_a_cardinale wrote:I sometimes do that when I'm concerned about a crash and I want to make sure everything gets logged.
All you need is a flush after writing, keeping the file open.
03-20-2024 10:35 AM
I have attached images of the device that the VI is going to working in conjunction with along with a video of the device in motion.
The potentiometer is connected to a moment arm that an Administrator will manually lift with a person's leg on the grey plate forward to simulate the torque that is generated by the hip. The human error that has been noted is that there will not be absolute consistency when lifting the leg as it isn't automated but rather done by an Administrator which is why we're measuring by the angle and not by the speed of the Administrator. The angle has been correlated to the change in voltage in the Arduino code and the load cell that is underneath the grey plate has also been modified to display torque. Arduino is constantly printing the angle and the torque with a 200ms delay as such:
10 45
12 49
13 53
... ...
112 92
100 85
The Administrator will lift the patients leg to its highest point (within human reason) and then bring the leg down and raise their leg 2 more times. Another problem just occurred to me that each person has different flexibility so I would test their furthest range of motion first and then set the upper limit? Or could I set a variable for the upper limit?
The idea is to keep the data as the leg is going up for each repetition and for the VI to only start recording once the moment arm has settled at 0 degrees again, possibly after registering 0 degrees to pause 5-10 seconds before recording again? I believe this can be done in the Arduino code but I am not sure how that would interface with LABView.
03-20-2024 11:13 AM
Your video seems corrupt and locks up all media players I tried.
03-20-2024 11:24 AM
Sorry about that, this one should work.