LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 91 random occurence

Hello All,

 

I have been facing with the 'Error91' randomly, not sure why? Though I have seen some posts on the forum regarding error91, couldn't end up concluding it. As u can see the attachment, the 'DB Tools Select.vi' is being used to retrieve the data from a table(am sure that table has no Null values). The Vi runs perfect for few days and falls with error 91 later at 'Variant To Data', which is circled in red. 

 

Any suggestions? Appreciate your inputs.

Download All
0 Kudos
Message 1 of 10
(3,719 Views)

As this error indicates that the "variant to data" function wasn't happy with the input type, my guess is that the database call is either not returning a value, or the value is a NaN.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 10
(3,710 Views)

Hi Putnam,

 

After monitoring for some time now, I could not really figure out the source of the Null in my scenaio. I have a table with 6 fields(2 of them can be Nulls). There are 5 VIs running parallelly and all of them are accessing this table with some only accessing the Not Null(means they can't have Nulls) fileds and some accessing those 2 Nullable fields.

 

The VI thats resulting with error 91 is not indeed accessing those 2 fields which can be Null. Not sure why its getting error 91 despite? And when this error occurs its freezing all other VIs(don't want this to happen really) with a pop-up box saying 'Continue' and 'Stop' referring to that VI. I wish all the VIs can run by neglecting this error. I am using here "DB Tools Select Data.VI", hope this VI is ok to use, though use 'DB Tools Execute Query.VI' method at other places? I may try modifying that table not to allow any Nulls at all.

 

All the VIs need to be run 24X7 without failure, but this error is really troubling with halt. Appreciate your thoughts.

0 Kudos
Message 3 of 10
(3,684 Views)

Hi Parny,

 

I could not find any specific information regarding the error that you are seeing, but after looking through the detailed help, I think you would be better off using the Database Variant to Data function as opposed to just Variant to Data.  This should clear up the error that you are seeing.  I hope this helps!

 

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 10
(3,664 Views)

Thanks for your sugestion Kim.

Is this function 'Database Variant to Data' good enough to handle unexpected Nulls, How does it differ from the Variant to Data?

0 Kudos
Message 5 of 10
(3,652 Views)

Hi Parny,

 

The Database Variant to Data functionality should handle Nulls.  What database program are you using for your application?  The input to a Variant to Data is a LabVIEW data type whereas the Database Variant to Data is specifically compatible with database headers, etc. I hope this helps!

 

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 6 of 10
(3,617 Views)

Hi Kim,

 

We are with Oracle7, which is a bit older. I have tried reading a Null field from a table of the database using 'Database Variant to Data', but thrown the below error,

 

Error -2147467261 occurred at Invalid pointer in db_sql.vi

Possible reason(s):

LabVIEW:  (Hex 0x80004003) Invalid pointer.

 

Anyway I will try using 'Database Variant to Data' by replacing the 'Variant to Data', probably with a general error handler with 'no dialog' option, hope that will keep the program running. Because my VI has been encountering the 'error 91' situation randomly and don't want it to halt. Once actually when error 91 has happened, I looked into the source table, but none of the fields are having Nulls in it, all are holding some valid data only. Don't know if it is any other issue that may be misleading here as error 91?

0 Kudos
Message 7 of 10
(3,607 Views)

Hi Parny,

 

Can you see where the error is occurring?  You can do this by highlighting execution and seeing exactly where the error is occuring.

 

Another thing that you can try as a troubleshooting step is to clear the error and see if the functionality will still work as expected.  The example shows one way to clear specific errors.

 

Kim

Applications Engineer
National Instruments
0 Kudos
Message 8 of 10
(3,590 Views)

The error was occuring at the "Databse variant to data" function on the block diagram in my last example which was noticed when I clicked on the 'Stop' button from the pop-up.

 

I have used clear error function before and not sure in this case clear error is much useful as I am not connecting the error out of the 'database veriant to data' further, may use general error handler.

 

0 Kudos
Message 9 of 10
(3,579 Views)

Some update:

 

This error 91 was just a mislead in my situation. In my vi, there is a case structure in which one of the cases reads the database(via select statement) and this case is triggered by a rpm(from a drive) threshold. The drive is aged up and leak current pushing the idle rpm above the threshold very randomly, which is causing the case structure in vi to read the database in a spiky manner. This is somehow generating the error 91 situation. Finally this has become stable since we handled the spiky occurrence of the trigger. Currently, error91 is not re-occurring since the change was made in the vi.

0 Kudos
Message 10 of 10
(3,538 Views)