function [S_idx] = PacketDefinition()

%Packet Structure
i = 0;
i = i+1; S_idx.time = i;
i = i+1; S_idx.TargetTension = i;
i = i+1; S_idx.MeasTension = i;
i = i+1; S_idx.TorqueCmd = i;
i = i+1; S_idx.TorqueAct = i;
i = i+1; S_idx.RPM_Cmd = i;
i = i+1; S_idx.RPM_Act = i;
i = i+1; S_idx.SD_TorqueAct = i;
i = i+1; S_idx.SD_RPM_Act = i;
i = i+1; S_idx.SD_Pos = i;
i = i+1; S_idx.PID_FF = i;
i = i+1; S_idx.PID_P = i;
i = i+1; S_idx.PID_I = i;
i = i+1; S_idx.PID_D = i;
i = i+1; S_idx.PID_Tf = i;
i = i+1; S_idx.cmd_min = i;
i = i+1; S_idx.cmd_max = i;
i = i+1; S_idx.SD_RPM_Cmd = i;
i = i+1; S_idx.SWC_OilPressure = i;
i = i+1; S_idx.SWC_OilPressureAlarmLimit= i;
i = i+1; S_idx.TorqueMode_VFD_RPMLimit = i;
i = i+1; S_idx.TorqueMode_PID_RPMLimitHaulIn = i;
i = i+1; S_idx.CraneIndoorMode = i;
i = i+1; S_idx.OutHaulerActive = i;
i = i+1; S_idx.ControlWord = i;
i = i+1; S_idx.StatusWord = i;
i = i+1; S_idx.TorqueMode_PID_RPMLimitPayOut = i;
end

