DTC dm1 description

Discuss issues and ideas you have to configuring displays with PowerVision
young123
Posts: 14
Joined: Thu Jan 16, 2014 4:59 am

DTC dm1 description

Post by young123 » Mon May 26, 2014 9:39 am

I am trying to read the dtc dm1.description using a script that works fine on a pv750, but not on a pv780.
It seems for the latter the description should be read from Dm1.Header.Description in stead of the earlier Dm1.DiagnosticStringId.
So thats the only change I can find between these two versions.

Somehow reading this Dm1.Header.Description always results in zero.
The other variables ( spn,fmi) are read at the same time and are always ok.
However when I put this variable directly into the Override string of a Text Widget, there is a text shown.

So what goes wrong here ?

I get the feeling that these header variables (all strings) are synchronized differently from the dm1.fmi and dm1.spn variables.
I use a script that first does the DM1GoToFirst. When this results in the VariablesWriteOk event I even check the Dm1.IsActive value.
When Active I read the following:

smRead(VariableIDs.Dm1_SourceAddress, sa);
smRead(VariableIDs.Dm1_FMI, fmi);
smRead(VariableIDs.Dm1_SPN, spn);
smRead(VariableIDs.Dm1_OccuranceCount, oc);
smRead(VariableIDs.Dm1_LampStatus, lampStatus);
smRead(StringIDs.DM1_Header_Description, stringID);

The dtc description is copied to the corresponding variable that is used to display in the text widget:
string tempString;
cultureGetString(stringID, tempString, 0);
cultureSetString(StringIDs.DM1_Description1, tempString,false);

Any idea what goes wrong here ?

I use PV 2.7.10419.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: DTC dm1 description

Post by stalley » Tue May 27, 2014 12:25 pm

Hi!

Right now, there is not a way in the 2.7 releases to retrieve strings from the database. This has been entered in our log of items to be added in a future release of the PowerVision tool. Using the stringid in 2.3 to retrieve a database item should not have been allowed. We will provide a more viable way for users the retrieve strings from the database in the future.

Thank you for bringing this to our attention.
Sara Talley
Software Engineer
Enovation Controls
Matt_Price
Posts: 1
Joined: Mon Aug 16, 2010 4:54 pm

Re: DTC dm1 description

Post by Matt_Price » Thu Jun 05, 2014 9:50 am

Upvote. I would like to use this feature as well.