Background: Micro850 Controller and using generic CIP messaging to a Powerflex70 VFD via a 20-COMM-E ethernet adapter.
Could someone help with this bit of STL code? This was downloaded from the RA knowledgebase downloads for the PF70, but the FaultID remains a zero value regardless of the actual fault ID internal to drive.
AB has a user manual for Powerflex 70 with a COMM-E adapter and looked through the Class codes, Instances, and Attributes. Everything else within the STL of the code works but this.
IF PF_Fault THEN
FaultCtrlCfg.TriggerType := 500 ;
FaultTarCfg.Path := ComTargetPath;
FaultTarCfg.CipConnMode := 1;
FaultTarCfg.UcmmTimeout := ComUcTimeOut;
FaultTarCfg.ConnMsgTimeout := ComConMsgTimeOut;
FaultTarCfg.ConnClose := TRUE;
FaultReqLeng := 6;
FaultAppCfg.Service := 14; (*Read 1 parameter*)
FaultAppCfg.Class := 151; (*DPI Fault object*)
FaultAppCfg.Instance := 1; (*Most recent error*)
FaultAppCfg.Attribute := 1; (*Fault Information*)
FaultTrig := TRUE;
MSG_CIPGEN_Fault(FaultTrig, FaultCtrlCfg, FaultAppCfg, FaultTarCfg, FaultRspdData, FaultReqLeng, FaultRspdData);
IF MSG_CIPGEN_Fault.Q OR MSG_CIPGEN_Fault.Status.Error THEN
PFFaultID := SHL(ANY_TO_DINT(FaultRspdData[2]),8)+ ANY_TO_DINT(FaultRspdData[1]);
END_IF;
ELSE
FaultTrig := FALSE;
MSG_CIPGEN_Fault(FaultTrig, FaultCtrlCfg, FaultAppCfg, FaultTarCfg, FaultReqData, FaultReqLeng, FaultRspdData);
PFFaultID := 0;
END_IF;
I can only slightly understand what is coded until the "Shift-Left" command that generates the fault ID.
Thanks!!!
Could someone help with this bit of STL code? This was downloaded from the RA knowledgebase downloads for the PF70, but the FaultID remains a zero value regardless of the actual fault ID internal to drive.
AB has a user manual for Powerflex 70 with a COMM-E adapter and looked through the Class codes, Instances, and Attributes. Everything else within the STL of the code works but this.
IF PF_Fault THEN
FaultCtrlCfg.TriggerType := 500 ;
FaultTarCfg.Path := ComTargetPath;
FaultTarCfg.CipConnMode := 1;
FaultTarCfg.UcmmTimeout := ComUcTimeOut;
FaultTarCfg.ConnMsgTimeout := ComConMsgTimeOut;
FaultTarCfg.ConnClose := TRUE;
FaultReqLeng := 6;
FaultAppCfg.Service := 14; (*Read 1 parameter*)
FaultAppCfg.Class := 151; (*DPI Fault object*)
FaultAppCfg.Instance := 1; (*Most recent error*)
FaultAppCfg.Attribute := 1; (*Fault Information*)
FaultTrig := TRUE;
MSG_CIPGEN_Fault(FaultTrig, FaultCtrlCfg, FaultAppCfg, FaultTarCfg, FaultRspdData, FaultReqLeng, FaultRspdData);
IF MSG_CIPGEN_Fault.Q OR MSG_CIPGEN_Fault.Status.Error THEN
PFFaultID := SHL(ANY_TO_DINT(FaultRspdData[2]),8)+ ANY_TO_DINT(FaultRspdData[1]);
END_IF;
ELSE
FaultTrig := FALSE;
MSG_CIPGEN_Fault(FaultTrig, FaultCtrlCfg, FaultAppCfg, FaultTarCfg, FaultReqData, FaultReqLeng, FaultRspdData);
PFFaultID := 0;
END_IF;
I can only slightly understand what is coded until the "Shift-Left" command that generates the fault ID.
Thanks!!!