LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

magnetic field measurement

Hi,

After advise from the forum last time I was able to ramp up my power supply via GPIB through labview as shown in the attached working Vi however I now wish to slightly modify the program While applying a current for a number of milliseconds I  want to take an analogue reading from a hall sensor element. I am using labjack as my data acquisition product ( since the Ni usb was out of stock) I have the analogue input driver provided by labjack and is included in the attached but would be most grateful for help with connections. The end goal is to be able to step up through a range of currents and record analogue inputs for each step then plot a graph on screen of current versus analogue input voltage from the hall sensor.

Any help advise much appreciated, thanks in advance.

Marc
0 Kudos
Message 1 of 16
(5,996 Views)

Your posting didn't include any of the subvis. But it looks like you're pointed in the rigth direction logic-wise at least.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 16
(5,975 Views)
Hi

In my last post I was working on using the GPIB to alter my current output and a 'labjack' data aacquisition board to record a magnetic field measurement from a hall sensor, while applying the current. After checking the duration of the shortest pulse the GPIB can provide on an oscilloscope I found it to be around 240ms which was way too slow I have therefore decided to try to use the labjack board to provide the output current to my electomagnet via a power opamp which allows me to apply -10 to +10 amps. The dilema is I need the daq to output an analogue voltage for as short a time as possible approxamately 10ms ( so only a short duration pulsed field is applied through the electromagnet), during this 10ms period I want to read in 1 analogue voltage measurement from the hall sensor element through the daq ( analogue input). Once this has completed, time is no real issue nor is the output of the daq until the next voltage pulse I send out from the daq and analogue input measurement which should be the same time duration as described.
As stated the daq will output a voltage into a power amplifier circuit I have built which will output a current from -10 to +10 amps depending on the daq voltage output. Therefore each time the daq output voltage will be varied to give me -10amps( for 10ms) then -8amps ( for 10ms)....and so on upto +10 amps (10ms) each time taking an analogue measurement each time.

I really do not want to purchase a second u12 since I struggled to afford the first. Can anyone help?

Thanks in advance
0 Kudos
Message 3 of 16
(5,949 Views)

Hi,
   Three things: 1) what is the u12 you refer to, 2) what problem are you currently seeking help for (you describe what you are doing but don't really explain in you last post where you are stuck), 3) as Mike Porter points out you have sent an incomplete vi, making it difficult to assist you. If you "Save with options", "Development distribution", it will include the sub-vi's.

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 16
(5,945 Views)
Hi,

Sorry, the u12 is a product made by labjack similar to Ni low cost usb based daq unit  (http://www.labjack.com/labjack_u12.html). Yes I have moved away from the previous vi due to to the time constraints with GPIB  (as mentioned) The problem is with this u12 and it may be the same for the Ni based usb product product you are apparently unable to perform any other function while the daq is streaming in data. Since  I was intending to allow continous streaming of data from the analogue input ( hall element)  and then perform an anaolgue output to pulse electromagnetic field and store the relevant analogue input which was taken while the electromag was being pulsed. I really want to know away around this problem.
In all honesty I don't need streaming I only need to record one measurement during the 10ms electromagnetic pulse, but I am slightly confused where to start???

regards and thanks

Marc
0 Kudos
Message 5 of 16
(5,935 Views)

Sound like what you really need is a multi-purpose io card--and nothing too fancy. A little analog IO, a little timing, maybe a little digital IO. Is there a reason you went with the external devices?

Mike...

PS: hey "little put", how is "big put" doing these days?


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 16
(5,928 Views)
Yes it was cheap and multipurpose so it can be used for other projects when mine is finished.

Marc
0 Kudos
Message 7 of 16
(5,922 Views)
The problem is that while the box itself might have the resources you need, it sounds like the USB interface prevents you from being able to use the resources the way you need to.
 
Mike...
 

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 16
(5,902 Views)
A thought that did occur to me was would it be possible to take an analoge reading during this 230ms pulse from the GPIB after about 10 or 20ms?? because in all honesty the pulse can last as long as possible as long as I can take a magnetic field reading as near to the start of the pulse as possible. If so could you advise on the attached vi.

I have put together a Vi combining the power supply Vi with an output to excel the analogue outputs I get when applying 1..2..3...4..5 amps would look to be correct since the response is linear as you would expect. However the problem still remains I am unable to tell at which point during the 250 ms GPIB pulse I am taking the analogue reading is it after 10 ms or 100ms or ????. It may seem very picky but I need to take the reading as early as possible before the magnetic field has had chance to penetrate through the entire sample I am measuring.

Any way of measuring the time from GPIB output to analogue input???
0 Kudos
Message 9 of 16
(5,883 Views)

First the good news, the code you sent looks really good (the analog in VI is still missing though). There are only a few small changes I would recommend:

  1. It's typically not a good idea to have controls inside loops because while reading a control doesn't take up much time, it does take some. Better to move Output, OVP Volts, Volts and Channel outside the loop and run the wires in.
  2. Wire the error output from the TSX3105P Close.vi to the error input of Open Excel and Make Visible.vi, and move the error out indicator to the end of the error string after the last Close.
Now the not so good news. Given the USB interface it will be tough reliably hitting your timing requirement. One thing to look at is the possibility of external triggering. For this to work, the TSX3510P has to have a trigger out signal that the instrument can automatically assert when it turns on (or changes) its output, and your external analog input device has to have a trigger input that can initiate an acquisition. If you have those resources, set your acquisition device to acquire 10 samples at a 1 msec rate when its triggered.
 
Inside the loop, the instrument would simultaneously turn on its output and assert the trigger out signal. This signal would trigger the acquisition and the 10th sample would be 10 msec after the signal came on. This would work, but is dependent upon features your hardware might not have.
 
An alternative is (in a way) to reverse the order of the analog input and the excitation activation but with the external device set to acquire a large number of samples at a .1msec rate. The process here would be to start the acquisiton, turn on the signal source, and read the captured waveform. You could then post process the captured data to identify the excitation turn-on point and then from there calculate a point 10 msec (100 samples) later. It ain't pretty, but it could also work.
 
However, another thing you might want to consider is whether you can get your money back on the external box and get a cheap multi-function A/D card to replace it--then building your application would be a slam dunk.
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 10 of 16
(5,878 Views)