06-10-2022 02:21 PM
Hey there!
I am kind of stuck here and hoped that the community can maybe help me. So, for a project at my uni, i would like to get a 3-D measurement for a magnetic field using 4 sensors. The magnetic field itself is being produced by a coil magnet i build myself. To measure the current i build in a shunt resistor. Furthermore i want to measure the Voltage/Ampere from my power supply.
My problems are:
Here is a screenshot of my program and the file is also attached.
Any help would be much appreciated!
Solved! Go to Solution.
06-10-2022 04:03 PM - edited 06-10-2022 04:47 PM
Wow that is sensory overload in more ways than one ; ). It's probably not the best idea to have all that in the same loop, that will cause problems and is why you are not getting 'constant' values as you say. Try making a loop for each I/O that you are doing and test them individually. After that you might have a couple loops running in parallel to handle the I/O, In the current configuration you have to wait for everything to finish in the main loop before looping, which is bad.
Also, Sub VIs can help you break up functional blocks of code into better easier to manage code. If each small piece of code works you can put them together to make working larger program that is easier to debug.
Also, wires should only go left to right, if they are going 'back' its a bad sign.
06-14-2022 08:51 AM - edited 06-14-2022 08:52 AM
Hey 🙂
first of all thank you for your help🙏
So i extracted now only the part from my loop that i want to improve/speed up, but i have the same result...
kind of feel lost here😩
Can it have something to do with the settings i have in my DAQ Assistant?
06-14-2022 09:49 AM
if you feed small parts of wfrms into a waveform-chart it will regard the timestamp and display it accordingly, so that's what so see shunks of data with a pause inbetween . seems that you don't read continiously.
if you don't care about the timing and only want to show the incomming data as a continious stream just use the Y-data of the wfrm and wire it to the chart.
real the LabVIEW help about chart (I think it's explaned there ...somewhere)
06-14-2022 10:28 AM - edited 06-14-2022 10:38 AM
@Jugo wrote:
Hey 🙂
first of all thank you for your help🙏
So i extracted now only the part from my loop that i want to improve/speed up, but i have the same result...
kind of feel lost here😩
Can it have something to do with the settings i have in my DAQ Assistant?
As with many things in LabVIEW there is an awesome example of how to set up a voltage reading. From any VI click on Help/Find Examples then use the explorer to navigate to the desired example, For this one I searched 'voltage' and you get many examples, see attached.
It shows you how to programatically set up a voltage input then read it. Setting things up via DAQ Assistant works but you might find it more useful to set things up directly in code using the DAQmx VIs which are quite handy.
06-22-2022 09:56 AM
Hey😊
the example finder helped me a lot! And so far i get a constant value for my voltage so that is awesome!! I just have to see what´s going to happen once i put it into my "big" program. But so far it looks good! Thank you so so much for your help i really appreciate it.
I just wonder what settings i messed up with the DAQ Assistant.. Because it should also be possible that way, right?..
So the first of my 2 problems is solved which is great.
Does anyone have an idea, what causes the values of my sensor to act so weirdly?... Is it the size of the loop? What a mystery this is..