LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with building a logging vi for strain measurements with cRio

Hi all,

 

I'm an engineering student currently working on my thesis project which includes measuring some frame stresses from truck trailers. However I'm unfortunate enough not to have any experts at my school on Labview since the only teacher who has been doing programming with it left on a work trip for three months and my measurements are already due next week. He got me started with my coding but to be frank, I'm still quite puzzled by Labview since I haven't been using it at all before.

 

My equipment for the measurements are cRio 9022 with universal analog module 9219 and strain gage module 9235. The measurement is currently done as a state machine which monitors the gage signals and initiates the measurement if the signal passes a certain treshold. After that it should log the results combined with date & time as a spreadsheet file to a connected USB stick. So basically nothing more fancy than data logging.

 

My most pressing questions are that how am I able to know what is the excitation voltage coming from the above mentioned modules? As attached in the screenshot below (Presence_detection), I have displayed the reading from the modules before conversion to stress but the readings make no sense since they say only 0,0029 Volts or so. 9235 excitation voltage should be 2 volts and for 9219 50 mV - I don't even know if this is enough to get reliable readings? Also 9235 module has an internal shunt calibration but I don't know how to operate it - it should be done somehow with the software, I think?

 

I would also like to have help with writing the spreadsheet file to the USB since I have absolutely no idea how it should commence. My desire is to have a new spreadsheet created every 30 mins to one hour so that the size of the file wouldn't grow into too big (with sampling rate of 10 hZ).

 

I appreciate all the help I can have, I have watched all the educational tutorials here on NI page and they clarified some stuff for sure. It is just difficult  to make sense of things since I haven't found any similar example with cRio and strain measurements and since the Labview environment is not that familiar to me.

 

 

-Kalle Seppala

Download All
0 Kudos
Message 1 of 6
(1,430 Views)

Hi seppalaka,

 

My most pressing questions are that how am I able to know what is the excitation voltage coming from the above mentioned modules?

Why don't you read the manual coming with your module? It explains all the details including some circuitry schematics!

 

I would also like to have help with writing the spreadsheet file to the USB since I have absolutely no idea how it should commence. My desire is to have a new spreadsheet created every 30 mins to one hour so that the size of the file wouldn't grow into too big (with sampling rate of 10 hZ).

You should  not collect your data in an array growing with time. Especially not in a RT target like your cRIO!

Write the data to a file instantly (or atleast once a second). Soving to file is done using basic file functions: OpenFile, WriteText, CloseFile.

All you need to do is finding the correct path to your USB drive (I think it's F:, but I'm not sure about that). And maybe check for presence of the drive - or for any file function errors…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 6
(1,348 Views)

Thank you for your reply, GerdW.

 

Would you know it, I have read the manuals - otherwise there would be no point to ask of the stuff here, would there? 9235 is currently working ok with the excitation of 2,0 volts as mentioned in the manual but I still don't understand the principle with 9219 since its manual mentions that the excitation in quarter bridge mode would be only 50 mV. Can this really be so? At least I don't at the moment get any sensible readings out of that module when I apply the same strain conversion vi as with the 9235.

 

With the file writing my teacher instructed me to use functions "unbundle by name" followed by "write to spreadsheet file" to the array that's been created in my previous screenshots. Would you recommend I'd log my data as a text file instead of this? I'll do my afteranalysis of the data anyway with Excel so I guess either way would work for me as long as the data is separated correctly and the files are not too large.

 

-Kalle

0 Kudos
Message 3 of 6
(1,330 Views)

Hi seppalaka,

 

when I read the 9219 manual I can read a special mention of excitation votage in the bridge measurement description linked with a table in the specifications chapter with some excitation voltage numbers (see page 15/16 and page 28/29…) The excitation voltage for a quarter bridge heavily depends on load resistance!

 

 

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 6
(1,327 Views)

I understand, this is what I have read myself. Now I don't know, if I fully understand corretly what that means, but the way I see it with my 120 ohm quarter bridge strain gage and a wire resistance of 0,44 ohm/m for the length of three metres the total resistance in one channel on the 9219 module in my case would be a bit over 122 ohms, correct? And as the table says, the excitation would in that case be just a bit over 0,05 volts, is this so?

 

I don't mean to be rude but I don't really need any links to the manuals anymore, I'd just like some facts from people who are familiar with these kind of measurements and equipment since I myself am not. I am trying my best to learn the principles and theory but (as always) time is limited..

 

-Kalle

0 Kudos
Message 5 of 6
(1,323 Views)

Hi Kalle,

 

the manual is always right - as long as not stated otherwise… 😄

 

So yes, you will have an excitation of 50mV.

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 6 of 6
(1,317 Views)