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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone seen error 1508

Solved!
Go to solution

Normally when I google a LabVIEW error code I don't have too many problems finding information. This one doesn't seem to have much.  If fact it's not even listed here:http://zone.ni.com/reference/en-XX/help/371361P-01/lverror/misc_lv_error_codes/

 

Luckily the explain errors comes up with the following:

 

Error 1508 occurred at an unidentified location

Possible reason(s):

LabVIEW:  Cannot change the name or path of a VI that is part of a library in its current state.

 

So here's how I'm getting this.  I have some scripting code.  It takes a class and finds a specific vi within it (a template) and then does a save as and then modifies the new vi.  Then does a saveall on the owning class.  Then loops around and does it again to save a copy as another new name.

 

The first time everything goes fine.  The second time I get error 1508.  

 

I am saving everything on the class and I'm making sure to close the vi reference between calls.  The second time through it finds the template vi correctly and the second save as path is valid.

 

Anyone have any ideas?

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 1 of 13
(4,263 Views)

I Think... (I do not Know for certain) that 1508 is an error attempting to add to a library that is not runable because it needs saving.  You need the library save method between calls 

 

and a template vi would be preferable.  as in MyBar.VIT not vi


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 13
(4,238 Views)

I can add a lot of value but at one time Stephen explained that a VI created from VIT is technically not part of a class and can not access private functions because it is not part of the class.

 

That was ages ago and  I have not tried it again since.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 13
(4,214 Views)

Well I am saving the class at the end of each iteration, so that is not the problem.

I tried using a .vit instead and that made no difference.

 

Anyone have any other ideas?

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 4 of 13
(4,194 Views)

New wrinkle...

 

At the end of each loop iteration, I am saving the class.  If I put a breakpoint right after I do that and then when it stops, select "Save all this project", the unpause the breakpoint, it seems to work for the next iteration.  So apparently it requires more than just saving the class... Also the window  that shows what is being saved when I click on "Save all this project" disappears so quickly that I can't see what is being saved.  Is there a way to make it stick around longer?  Or some other way to figure out what needed saved?

Also...

Anyone know how to use scripting to do a save all on the active project?  I couldn't find a scripting method to do that.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 5 of 13
(4,177 Views)

Another datapoint:

 

I got to the breakpoint, before programmatically before the "save all this class" and hit the abort and then tried to exit LabVIEW.  It spit back the following... See below.Saved Items.png

Still doesn't enumerate what needed saved though?

 

 

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 6 of 13
(4,175 Views)

 

 

This made me think that perhaps the ref wasn't good, but I double checked and when I probed it, it appeared to be fine...  Here is the vi I'm using to save all on the class (see below).  It's from the hidden gems palette.  Anyone ever used it before?   Any have insight into why it might not save everything?  Darren?  

 

It's password protected so I can't delve into it, but it seems it almost has to be the problem. Since if I breakpoint either before or after it and manually "Save all this class" everything seems to work fine.  And the ref seems fine....

 

Anyone have any other ideas?  Anyone else ever have problems with that vi?

 

save all this lib.png

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 7 of 13
(4,172 Views)

Not sure if you found this already, but this thread some more exposed code that I believe is attempting to replication the functionality of the Save All button.

 

 

https://forums.ni.com/t5/LabVIEW/Programmatic-execution-of-Save-All-command-ctrl-shift-s/td-p/299324...

 

--

Aaron F.

National Instruments

0 Kudos
Message 8 of 13
(4,143 Views)

Well I obviously didn't look at the pallettes too closely... If you look at the screenshot I just posted, there is a save all this project vi...

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 9 of 13
(4,138 Views)

Onfortunately that didn't work...

 

Argh.....

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 10 of 13
(4,137 Views)