Hello,
I use the GUI in combination with the motorcontrol package and the 28027F.
a while ago I modified the C2000 Instaspin Universal GUI so I added some code in the index.js file to convert system values.
-------------
//
// Bus voltage
//
gc.databind.registry.bind('widget.ti_widget_numberbox_busvoltage.value',
{
BusVoltage: 'my_xds.gMotorVars.VdcBus_kV'//,
// Vd: 'my_xds.gMotorVars.Vd'
},
function(value) {
return(MyUtil.DivideQ24_multiply1000(value.BusVoltage));
// var toQ24 = value.BusVoltage/(Math.pow(2,24));
// var result = Math.round(toQ24 * 1000);
// return (result);
}
);
-----------
I also added an file to the project where I collected all the convertion functions e.g. DivideQ24_multiply1000
--------------------
(function() {
"use strict";
MyUtil = {
multiply_by_100: function (oldValue)
{
var result = oldValue*100;
return (result);
},
DivideQ24_multiply1000 : function(oldValue)
{
var toQ24 = oldValue/(Math.pow(2,24));
var result = Math.round(toQ24 * 1000);
return (result);
},
Divide1000_multiplyQ24 : function(oldValue)
{
var divide = oldValue/1000;
var result = divide*(Math.pow(2,24));
return Math.floor(result).toString();
},
Divide_by_Q24_two_precision : function (oldValue)
{
var toQ24 = oldValue/(Math.pow(2,24));
var n = toQ24.toPrecision(3);
return (n);
},
------------------
at that time it worked fine but now non of the values is shown in the GUI.
all variables like flags can I still handle.
have you got any idea what went wrong?
I also found a new GUI, but here I've got the same problem: how do I convert the values.