I have a user.c code which is trying to read some data dictionary variables as follows:
// Global
tDDictEntry *Park, *Ax, *Ay, *WheelSpd_FL, *WheelSpd_FR, *WheelSpd_RL, *WheelSpd_RR;
tDDictEntry *YawRate, *EngineLoad, *Gas, *SelectorCtrl, *Trq;
tDDictEntry *GearNoTrg, *Rotv, *GearNo, *SteerAng, *SteerVel;
tDDictEntry *SteerAngleFr, *SteerAngleFL, *Brk
double park, selectorctrl, gearnotrg, gearno;
double ax, ay, wheelspdFL, wheelspdFR, wheelspdRL, wheelspdRR;
double yawrate, engineload, gas, trq;
double rotv, steerang, steervel;
double steerangleFR, steerangleFL,;
//User_TestRun_Start_atEnd()
EngineLoad = DDictGetEntry("PowerTrain.ControlIF.EngineOut.Load");
Gas = DDictGetEntry("DrivMan.Gas");
SelectorCtrl = DDictGetEntry("DrivMan.SelectorCtrl");
Trq = DDictGetEntry("Engine.Trq");
GearNoTrg = DDictGetEntry("PT.Control.GB.GearNoTrg");
Rotv = DDictGetEntry("Vehicle.Engine_Rotv");
GearNo = DDictGetEntry("Vehicle.GearNo");
SteerAng = DDictGetEntry("Vehicle.Steering.Ang");
SteerVel = DDictGetEntry("Vehicle.Steering.AngVel");
SteerAngleFr = DDictGetEntry("Car.SteerAngleFR");
SteerAngleFL = DDictGetEntry("Car.SteerAngleFL");
//User_Calc()
//engineload = EngineLoad->GetFunc(EngineLoad->Var);
//gas = Gas->GetFunc(Gas->Var);
//selectorctrl = SelectorCtrl->GetFunc(SelectorCtrl->Var);
//trq = Trq->GetFunc(Trq->Var);
//gearnotrg = GearNoTrg->GetFunc(GearNoTrg->Var);
//rotv = Rotv->GetFunc(Rotv->Var);
//gearno = GearNo->GetFunc(GearNo->Var);
//steerang = SteerAng->GetFunc(SteerAng->Var);
//steervel = SteerVel->GetFunc(SteerVel->Var);
Log("%lf",EngineLoad->GetFunc(EngineLoad->Var));
In the User_Calc() function above, if I uncomment the commented lines, the compiled CarMaker executable doesnt load and times out. If I Log the EngineLoad or any of the other variables, I get an ERROR “Caught signal SIGSEGV(11)”
I am able to get other data dictionary variables using the same method such as Car.ax, Car.Yaw.
What can be causing this?