Posts

Showing posts from February, 2012

Using jqGrid with JsonResult in ASP.NET MVC 3

I have been working on an ASP.NET MVC 3 project with a C# backend, and I wanted to get a grid going that had grouping capabilities. I came across jqGrid and decided to give it a try. I discovered a blog post which got me close, but it still took a bit of doing. It turned out to be a pain, but I managed to get basic data display working (I'll try to update this post when I get grouping working). I decided to post the code because it wasn't straightforward, and all of the other blog & forum posts on the topic didn't quite have a complete solution. The code has a bit more detail than is necessary for this post, but I hope it is useful.

Here is my HTML...
My javascript looks like this...

There are a couple things to note.
Line 3: The url attribute. It took a bit of trial & error to figure out this url format for my controller method. "Asset" is the controller (my actual controller name is "AssetController"), and "GetGridContents"…

ClearSCADA Point Values Won't Update

Today, I had issue with ClearSCADA points not updating to the current value. The logs showed the correct value being returned from the PLC, but ViewX & WebX didn’t update. However, if I took the point in & out of service or changed the configuration, the value would update. Turns out the Significant Change (deadband) property was biting me. I had set my full scale very high (1000000000) & significant change defaults to 1% of span. So, the changes of 5 or 10 were not large enough to overcome the deadband. So, I set the significant change to "none". The problem persisted. After talking with support, I realized "none" didn't really mean none. The Significant Change feature was still in effect. To fix the issue, I had to set to absolute & set value to a very small number (.0000001).