From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-05-2011 10:43 AM
Solved! Go to Solution.
02-05-2011 10:52 AM
Here is the program. What I do is wait until the start of a minute on the clock to run it. It creates the database and process and starts recording. Then stop it and open up the backfill program and put a time range in there that you started collecting data. Click the display data button to view and try changing data then click the save data button and then display data button again. So you are basically reading, then changing data, then writing data, then reading back the data.
Thanks for looking into it.
Matt
02-05-2011 10:53 AM
I forgot to mention that main.vi is the first program to run.
02-07-2011 06:38 PM
Hi Matty,
While you have done a very good job of using subVIs in your application, I cannot find where you are actually getting the data to write back to the trace, so therefore having a hard time finding the problem. Is there any way that you can cut this code down so that it is easier to look through and so we can narrow down the cause of this error? That would make troubleshooting much easier.
Brandon Treece
Applications Engineer
National Instruments
02-08-2011 09:06 AM
Hey B Treece,
I have been working on my code and it is a little better than what it was. Before you begin, make sure that the CEM Database is deleted from MAX (if it exists from before. Every time you run this program you should delete the CEM Database to simplify debugging). If you run the main.vi it will begin saving data to a trace (timed Loop). If you go to edit --> backfill this will bring up the backfill VI. Then click on the From "set time date" and select the "set time to now" and OK. Then Click on the To "set time date" and select the "set time to now" and OK. Now if you click on the "Display Records" it will get the time range you just specified from the database and display it in the cluster array. At this point try to change a few values in the cluster array (only the numeric data, not the time). Then click "Save Changes" which will save the changes you made. Now click the "Display Records" again. This will read back the same data you just saved. Notice how it read back slightly different numbers than what you saved?
The backfill.vi is an event structure and the actual Vis that write traces is the "Write Changed Data.vi" which runs when you click "Save Changes" button. The vi that reads traces is the "Read Selected Data.vi" and this runs when you click "Display Records" button.
At this point it would take too much time to minimize the code. To help you figure out this one I should tell you that I have ran it on multiple computers with the same result. I think that it has to do with deleting a trace and re-creating the same trace with slightly changed element values.
Hope this helps.
Thanks
Mattyk
02-08-2011 10:30 AM
OK OK OK,
I have re-created the problem. When you run it the first time it generates an error:
Citadel: (Hex 0x8ABC1003) The operation cannot be completed because the resource is in use by another client.
I could debug this but if you stop it and re-run it it will work this time. If you notice, it tacks a 56 on to the end of all elements. This is defiantly a Labview bug.
Let me know what you think.
Thanks
Mattyk
02-09-2011 11:58 AM
Hi Matty,
Thank you for those demo programs, it really helps with the debugging. First, the Hex 0x8ABC1003 error occurs because at the end of the program you do not have the error wires from Get Trace List.vi wired to Read Trace.vi, so they try to execute at the same time.
Secondly, the reason you are seeing different values than the ones you are writing has to do with the precision of the database. If you notice the Open Trace VI has an input titled "value precision", which if nothing is wired to it, defaults to 0.01. If you want to store uncompressed values, wire in a value of 0. You will then notice that the read data is exactly what you input, as in the modified debug.vi attached.
Regards,
Elizabeth K.
National Instruments | Applications Engineer | www.ni.com/support
02-09-2011 12:06 PM
Thanks a lot. I assumed that the default precision was based on the precision of the value you write. Problem solved.