LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmically change trace database URL NI HyperTrend

Solved!
Go to solution

Hello,

 

I would like to be able to programmically update/change the URL for the traces in the activegroup of my NI HyperTrend while the program is running. The reason I want to accomplish this is because the program automatically create a new database then updates the library properties to point to the new database. The NI HyperTrend no longer will plot the current data since the data is no longer logged there. So I need to change the database URL of ITrace2 properties to the new database.

 

Attached is a bmp file which shows the block diagram of what I think should be how this is done. I get an -2147417851 error of which I don't understand. Please Advise, thank you.

Daniel Keyser


"I reject your reality and substitute my own"
Adam Savage
"Mythbusters"
0 Kudos
Message 1 of 9
(3,969 Views)

ok I would like to use one of my life lines...ummm call a friend or well an application engineer...

 

Don't mind me, I don't mean to sound rude. I just have had WAY too much coffee...

Daniel Keyser


"I reject your reality and substitute my own"
Adam Savage
"Mythbusters"
0 Kudos
Message 2 of 9
(3,944 Views)
Here is the actual VI
Daniel Keyser


"I reject your reality and substitute my own"
Adam Savage
"Mythbusters"
0 Kudos
Message 3 of 9
(3,929 Views)

Something I found right off the bat that may help:

Try running your main VI and subVI in the User interface thread. 

 

To run a VI in User Interface, go to File>>VI Properties>>Execution and select User Interface for preferred execution system. The default is standard.

Misha
0 Kudos
Message 4 of 9
(3,927 Views)
Little note here. The posted vi is not 100 complete. I have not finished the process of changing the URL strings[] to the new database name url. So the updateDBpath case is not done.
Daniel Keyser


"I reject your reality and substitute my own"
Adam Savage
"Mythbusters"
0 Kudos
Message 5 of 9
(3,926 Views)

I set the mainVI and subVI to excute in the user interface and got an error.

 

 

 -2146959355

Server execution failed
 in trendViewScrn.vi->testingSubVI.vi

 

I also tried it in standard for my own exploration.

 

-2147417851

The server threw an exception.
 in trendViewScrn.vi->testingSubVI.vi

 

Daniel Keyser


"I reject your reality and substitute my own"
Adam Savage
"Mythbusters"
0 Kudos
Message 6 of 9
(3,921 Views)
Solution
Accepted by topic author Dan@NIST

Dan,

 

sorry for the delay - I can't find much on the error. One suggestion: when you pass the loop enumerator to the "index" parameter, try incrementing it first, in case the index system of the traces is 1-based and not zero-based. Let me know if this makes a difference. 

Message Edited by mishkin on 02-27-2009 12:31 PM
Misha
Message 7 of 9
(3,878 Views)
BINGO!! Wow... I would of never thought that would work!! Sweet Thanks!!
Daniel Keyser


"I reject your reality and substitute my own"
Adam Savage
"Mythbusters"
0 Kudos
Message 8 of 9
(3,873 Views)
Or better said I would of never thought to try that.
Daniel Keyser


"I reject your reality and substitute my own"
Adam Savage
"Mythbusters"
0 Kudos
Message 9 of 9
(3,871 Views)