piputval and piputvalx issue

Hi,

I have an issue with piputval and piputvalx in MS excel VBA.

Fyi, I'm using MS Excel 2016 64 bit.

When I tried to use the sample file piexam64.xls in ...\PIPC\Excel only digital and string points that succesfully written in the PI archive, while all numeric data's were failed.

 

Is there any additional setup that I need to be done for this issue?

 

Thanks,

Rochim.

  • Hi Taufiqur,

     

    You've created a problem by starting to be creative.  You changed the order of PI Points, by placing a working PI Point (exceldig) in first place. One option to address this would be reverting the change you've made and to start over. Another option is to use the debugger controls to continue execution until the breakpoint is hit next time. Writes (and reads) are performed in loops which means each row referring a PI Point and value is processed individually.   

     

    The VBA Editor offers a few buttons. Below screenshot shows "Continue", "Break", "Reset" and "Design mode" from left to right.

     


    Clipboard01.jpg.jpg

     

    You will likely see the "Break" grayed out because the set breakpoint already causes the debugger to "break in". You could use "Continue" to process the next row. By hovering the mouse cursor over sTagname you could verify which PI Point was processed right before hitting the break point. "Continue" until you hit a numeric PI Point. Now confirm the PIPutValx return value by hovering your mouse cursor over macroResult.

     

    The hope is that the value of macroResult is indicating what makes writes fail in your case.

     

    By the way, hit "Reset" if you like to stop debugging. This will exit the loop and stop execution.  

  • Reading through the PI Message Log, this stands out to me:

     


    2019-08-27+09_26_14-Window.png.png

     

    Internally the value is 5.5 (US formatting) but your regional formatting shows it as 5, 5 - which is considered to be a string and therefore the wrong value type.

     

    Please see 

     

    PIPutVal macro sends string when should send real value (7269OSI8)

  • Hi Rick Davin,

     

    At the begining, I also thought the samething. But even I tried to put an integer value the result still the same.

     

    And my PC system regional setting and excel setting have been set as  US formating.


    pastedImage_1.png.png


    pastedImage_2.png.png