Scaling Problem

I’ve got a standard group in FactorySQL 4.2.12 which has about 500 OPC items. I’m getting an error message that says “The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 78 (”@74"): The supplied value is not a valid instance of data type real. Check the source data for invalid values. An example of an invalid value is data of numeric type with scale greater than precision."

Is there any way to tell from FactorySQL which OPC item the parameter number refers to? The default sort order of the items is by “Field Name” but I’m not sure if that’s the order of the fileds in the insert statement. I noticed when I exported the group the items were listed in a different order.

That’s an interesting error that I’ve never seen before. Did FactorySQL create the table, or was it already in place? Does this error occur every time, or only occasionally? I’m curious as to whether the column data type could be something more specific than FSQL would use by default, or if this is only happening when data transitions from bad/empty to good.

Unfortunately there isn’t really a great way to tell which order OPC items will be written in. I’m inclined to say it’s the order they show up in the frontend in, but I don’t know that it’s deterministic.

I suppose you could create a copy of the group and then “divide and conquer”- deleting items until the error stops- in order to figure out where it’s at. But, that’s only going to really be possible if the error occurs consistently.

Regards,

FactorySQL created the tables. The error is consistent. I did some testing and changed the data type of some suspect items from Float to Double and that seemed some. I still received the error message but it specified a different parameter number. I ended up getting to one item where changing the data type and disabling scaling didn’t help. That makes me wonder if I’m modifying the correct one.

What version of SQL Server are you using?

Also, if you could export the group to CSV and email to support, that might help us replicate it.

Thanks,

Oh, and if you go into SQL Server, what is the type of the columns that were created?

I’m using SQL Server 2005. The SQL Server data types are float. I’ve emailed a Group export to support@inductiveautomation.com.

Well, with SQL Server 2008 I was unable to get that particular error, but I’ll see if I can install 2005 and try again.

Part of the problem could be that I don’t exactly know what’s leading to the error. The group configuration doesn’t seem too strange, so it might have to do with the values coming in from the device, which I can’t replicate. The best I can find about that error is that it comes from the values being outside the valid range for the data type, like smaller than 1e-38 or something.

Ideally you could create a test group with just one item that reproduced the problem. Then we could play around with changing data types in the database (some people suggested decimal instead of float). If that worked, you could change the datatype mapping in the db translator file and have FSQL re-create the tables for you.

Regards,