windows 11 causing trouble, c# windows forms app | LabJack
 

windows 11 causing trouble, c# windows forms app

3 posts / 0 new
Last post
bob111
bob123v's picture
windows 11 causing trouble, c# windows forms app

Hello I have had a running program until Windows 11 update. The program works on multiple devices that do not have Windows 11 so I believe it has something to do with that.

I will post some of the error messages and code below. Please let me know of any other info needed in order to tackle this.

 

LabJack.LabJackUD.LJUD.LJUDERROR.AD_PIN_CONFIGURATION_ERROR

Message = "Exception of type 'LabJack.LabJackUD.LabJackUDException' was thrown."

at LabJack.LabJackUD.LJUD.GetFirstResult(Int32 handle, IO& IOType, CHANNEL& channel, Double& val, Int32& px1, Double& userData)\r\n    

 

           LJUD.IO ioType = 0;
            LJUD.CHANNEL channel = 0;
            double dblValue = 0;
            double Value0 = 9999, Value1 = 9999, Value2 = 9999;
            double ValueDIBit = 9999, ValueDIPort = 9999, ValueCounter = 9999;
            int dummyInt = 0;
            double dummyDouble = 0;


            try

            {

                for (int j = 0; j < 8; j++)
                {
                    LJUD.AddRequest(myU3.ljhandle, LJUD.IO.GET_DIGITAL_BIT, j, 0, 0, 0);
                }

                LJUD.GoOne(myU3.ljhandle);


                LJUD.GetFirstResult(myU3.ljhandle, ref ioType, ref channel, ref dblValue, ref dummyInt, ref dummyDouble);
            }
            catch (LabJackUDException e)
            {

            }

LabJack Support
labjack support's picture
The error indicates a problem

The error indicates a problem with your pin configuration. You should ensure your analog enable config is set correctly. I would also recommend doing a pin configuration reset at the start of your script and configuring everything how you need afterwards. Please see the following relevant pseudocode:

https://labjack.com/support/datasheets/u3/high-level-driver/example-pseu...

https://labjack.com/support/datasheets/u3/high-level-driver/example-pseu...

If you are using the U3-HV, you cannot set DIO0-3 to digital inputs and there would be an issue with your loop of GET_DIGITAL_BIT commands.

bob111
bob123v's picture
Thank you, this was helpful.

Thank you, this was helpful. I changed the loop to the following and the problem was fixed.

                for (int j = 4; j < 8; j++)
                {
                    LJUD.AddRequest(myU3.ljhandle, LJUD.IO.GET_DIGITAL_BIT, j, 0, 0, 0);
                }