03-29-2022 06:39 AM
Kit: Labview 14 - NI SCB-68 - NI 6255 DAQ
Test: Reading voltages from a force balance in a wind tunnel in wind off then wind on conditions and applying a matrix to give processed force and moment data.
Process: Labview reads the voltages to create a zero file, the tunnel is then started, the software then rereads the voltages and takes off the zero readings to give 'live' readings and, when told, reads the voltages again (and saves as a volts file) then removes the zero voltages, applies the matrix and saves as a processed data file.
Issue: Labview always reads the zero voltages correctly but then reads almost random numbers from that point on in spite of the code being the same.
What's more confusing is it will work for a period (including tests one evening and the following morning) and then suddenly fail, especially as the voltages at the SCB-68 are always correct.
I've tried swopping cables, remaking cables, rerouting power cables, altering the order in which the cables are connected in the SCB-68, rewritten the code and now can't think of anything else to try - hopefully someone on here can come up with something that I've missed
Solved! Go to Solution.
03-29-2022 06:43 AM
Hi bean,
@Littlebean wrote:
rewritten the code and now can't think of anything else to try - hopefully someone on here can come up with something that I've missed
You missed to attach the code so we can inspect it...
03-29-2022 06:51 AM - edited 03-29-2022 06:53 AM
sorry, should be attached now
I'm sure that there are better ways of doing what I need (open to suggestions) but I can't understand how it can work intermittently?
03-29-2022 07:07 AM
@Littlebean wrote:
sorry, should be attached now
I'm sure that there are better ways of doing what I need (open to suggestions) but I can't understand how it can work intermittently?
That is not your code. That is a picture of your code with most of the relevant information hidden inside express vis. Please attach your actual vi.
03-29-2022 07:20 AM - edited 03-29-2022 07:23 AM
Hi bean,
@Littlebean wrote:
sorry, should be attached now
I asked for code and all I got is an image of code...
@Littlebean wrote:
I'm sure that there are better ways of doing what I need (open to suggestions) but I can't understand how it can work intermittently?
What about not using al those ExpressVIs? Their DDT datatype also hides a lot of information behind that thick blue line...
What about implementing error handling?
What about using subVIs?
You may also learn about using proper datatypes, like bundling related values into clusters. Learn to use less or no locals.
03-29-2022 07:27 AM
ok, should have attached the code now - apologies.
I should also say Labview (or indeed any coding) is not my day job and I'm learning as I go so any advice/pointers greatly appreciated.
03-29-2022 08:21 AM - edited 03-29-2022 08:31 AM
Hi bean,
@Littlebean wrote:
so any advice/pointers greatly appreciated.
I still advice of get rid of ExpressVIs, especially the DAQAssistent.
In my experience it is quite flaky when it comes to continuous operation of longer periods of time...
Example:
Here I just replaced the math ExpressVI and those 5 FromDDT instances...
03-29-2022 08:50 AM
thought I'd got rid of those empty frames....will do that now.
can (will) add comments
the scaling is just to make it easier to see on the front screen, it shouldn't be doing that in the final files, will double check that
label added in block diagram now
thanks for all your help
03-30-2022 06:39 AM
Update: issue has been traced to electrical noise generated by a second pc.................
Thank you for all the help and pointers on how I could improve the code, looks like I have much to learn!