diff options
98 files changed, 3592 insertions, 380 deletions
diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 Binary files differindex 659e1c6d4..1facf60d6 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 Binary files differindex 89f4a7a26..0741f3549 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 Binary files differindex 8d8ea84f8..14ead5f28 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 Binary files differindex fcfad8080..5d6364e53 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 +++ b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 diff --git a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 Binary files differindex 9b6b462e6..65a2eed82 100644 --- a/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 +++ b/Software/Embedded_SW/.jxbrowser-data/GPUCache/data_1 diff --git a/Software/Embedded_SW/.jxbrowser-data/History-journal b/Software/Embedded_SW/.jxbrowser-data/History-journal Binary files differindex e69de29bb..22388bc1b 100644 --- a/Software/Embedded_SW/.jxbrowser-data/History-journal +++ b/Software/Embedded_SW/.jxbrowser-data/History-journal diff --git a/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage b/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage index 0ad95661c..223f4f243 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage +++ b/Software/Embedded_SW/.jxbrowser-data/Local Storage - EXT/http_127.0.0.1.localstorage @@ -1,4 +1,4 @@ -#Tue Jun 12 16:38:32 IDT 2018 +#Thu Jul 12 14:41:56 IDT 2018 viewsData-storage={"ti.sysbios.knl.Task.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"stackSize","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackBase","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"curCoreId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"affinity","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Task"\:{"defaultViewName"\:"CallStacks"},"ti.sysbios.family.arm.m3.Hwi.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halHwiHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"type","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"group","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"subPriority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"}],"hasFormats"\:true},"ti.sysbios.family.arm.m3.Hwi"\:{"defaultViewName"\:"Exception"},"ti.sysbios.knl.Task.Detailed"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"mode","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"stackPeak","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackSize","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"stackBase","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"curCoreId","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"affinity","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"blockedOn","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.family.arm.m3.Hwi.Detailed"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"halHwiHandle","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"type","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"intNum","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"group","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"subPriority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"irp","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"status","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"coreId","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"}],"hasFormats"\:true},"ti.sysbios.heaps.HeapMem.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"buf","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"minBlockAlign","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"sectionName","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:true},"ti.sysbios.knl.Event"\:{"defaultViewName"\:"Raw"},"ti.sysbios.knl.Event.Raw"\:{},"ti.catalog.arm.cortexm4.tiva.ce.Boot.Module"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"configureClock","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"sysClockDivEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"sysClockDiv","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pwmClockDivEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pwmClockDiv","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"xtal","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"oscSrc","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pllBypass","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"pllOutEnable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"ioscDisable","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"moscDisable","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:false},"ti.sysbios.knl.Swi.Basic"\:{"columnStates"\:[{"name"\:"address","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"label","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"state","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"priority","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"fxn","checked"\:true,"hasFormat"\:false,"format"\:null},{"name"\:"arg0","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"arg1","checked"\:true,"hasFormat"\:true,"format"\:"Hex"},{"name"\:"initTrigger","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"},{"name"\:"curTrigger","checked"\:true,"hasFormat"\:true,"format"\:"Decimal"}],"hasFormats"\:true},"xdc.runtime.System.XDCROOT"\:{"columnStates"\:[{"name"\:"entry","checked"\:true,"hasFormat"\:false,"format"\:null}],"hasFormats"\:false},"xdc.runtime.System"\:{"defaultViewName"\:"Raw"},"xdc.runtime.System.Raw"\:{},"ti.sysbios.family.arm.m3.Hwi.Raw"\:{}} -rovSettings-storage={"exeMrus"\:["C\:/Tango/Software/Embedded_SW/Embedded/debug_w_pmr/Embedded.out","C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out"]} -rovInit-storage={"progressInfo"\:{"min"\:0,"max"\:7,"step"\:1,"notifyCount"\:6,"average"\:6,"numLoads"\:14},"autoConnectChecked"\:false,"exe"\:"<Use the program currently being debugged>","commLink"\:"Debugger","autoConnect"\:false,"noExe"\:true,"showIntro"\:true} +rovSettings-storage={"exeMrus"\:["C\:/Tango/Software/Embedded_SW/Embedded/Debug/Embedded.out","C\:/Tango/Software/Embedded_SW/Embedded/debug_w_pmr/Embedded.out"]} +rovInit-storage={"progressInfo"\:{"min"\:0,"max"\:7,"step"\:1,"notifyCount"\:6,"average"\:6,"numLoads"\:16},"autoConnectChecked"\:false,"exe"\:"<Use the program currently being debugged>","commLink"\:"Debugger","autoConnect"\:false,"noExe"\:true,"showIntro"\:true} diff --git a/Software/Embedded_SW/.jxbrowser-data/Login Data b/Software/Embedded_SW/.jxbrowser-data/Login Data Binary files differindex 1eccf7adc..5096550ae 100644 --- a/Software/Embedded_SW/.jxbrowser-data/Login Data +++ b/Software/Embedded_SW/.jxbrowser-data/Login Data diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c index 104b1d719..f5b898e2c 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c @@ -193,6 +193,26 @@ void Power_Reset()// Resets the MCU F3_SW_RESET_reg |= BIT0; } +//-------------------------------------- + +uint32_t ActivateChiller() +{ + F2_CTRL |= SPARE_SSR12_CTRL; + return OK; +} + +uint32_t DeActivateChiller() +{ + F2_CTRL &= ~SPARE_SSR12_CTRL; + return OK; +} + +uint32_t DeActivateAllSSR() +{ + F2_CTRL = 0; + return OK; +} + uint32_t Control_WD(bool IsEnable, unsigned char SetTimer_Steps100mSec) // Control_WD(ENABLE, 30);//Enable the watchdog for 3 seconds /* diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h index 48d7171a5..69d6548e6 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h @@ -185,5 +185,8 @@ uint32_t DeActivateDilutorPump(); void Power_Off(); void Power_Reset(); uint32_t Control_WD(bool IsEnable, unsigned char SetTimer_Steps100mSec); +uint32_t ActivateChiller(); +uint32_t DeActivateChiller(); +uint32_t DeActivateAllSSR(); #endif /* DRIVERS_FPGA_FPGA_GPIO_FPGA_GPIO_H_ */ diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index da6cfaab5..50adfb944 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -53,6 +53,7 @@ extern Semaphore_Handle sdCardSem; #include <Drivers/I2C_Communication/Previous_Code/I2C.h> #include "Drivers/I2C_Communication/I2C.h" +#include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" @@ -185,6 +186,9 @@ int main(void) //Run_I2C(/*ui32SysClock*/); //----------------------------------------------------------- + DeActivateAllSSR(); + + ActivateChiller();//SSR12 //EMAC_initEMAC(); ControlInit(); diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 0f477a66f..7f119ae79 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -47,7 +47,7 @@ uint32_t ControlIdtoHeaterId [MAX_HEATERS_NUM] = {0xFF,0xFF,0xFF,0xFF,0xFF,0x uint32_t DryerHeaterMaxTempControl = 0xFF; #warning the PT100 id for the dryer control is number2 - dryer internal ambient sensor. #warning the PT100 for head 4 is number 5 -uint32_t HeaterId2PT100Id[MAX_HEATERS_NUM] = {TEMP_SENSE_ANALOG_DRYER_TEMP2,TEMP_SENSE_ANALOG_DRYER_TEMP1,TEMP_SENSE_ANALOG_DRYER_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,TEMP_SENSE_ANALOG_MIXCHIP_TEMP,TEMP_SENSE_ANALOG_MIXCHIP_TEMP}; +uint32_t HeaterId2PT100Id[MAX_HEATERS_NUM] = {TEMP_SENSE_ANALOG_DRYER_TEMP2,TEMP_SENSE_ANALOG_DRYER_TEMP1,TEMP_SENSE_ANALOG_DRYER_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,TEMP_SENSE_ANALOG_MIXCHIP_TEMP,TEMP_SENSE_ANALOG_MIXCHIP_TEMP}; uint32_t DryerInternalPT100Id = TEMP_SENSE_ANALOG_DRYER_TEMP1; bool HeatersRestart = false; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 33086b636..2bd03f406 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -13,6 +13,8 @@ #include "Common/report/report.h" +#include "modules/general/process.h" + #include "drivers/FPGA/FPGA.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" @@ -224,9 +226,15 @@ uint32_t WinderPresegmentReady(uint32_t deviceID, uint32_t ReadValue) uint32_t Winder_Presegment(void *JobDetails, uint32_t SegmentId) { JobTicket* JobTicket = JobDetails; - int process_speed = JobTicket->processparameters->dyeingspeed; + float screw_speed = 0; float RotationsPerSecond; + int process_speed = dyeingspeed; + if (dyeingspeed == 0) + { + LOG_ERROR (-1," unknown job speed"); + return ERROR; + } if (SegmentId == 0) // do all this only in the beginning of the job. do not touch after that (assuming spool does not change mid job) { diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index d9aeb503a..29e2cd3f6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -26,7 +26,7 @@ #include "drivers/Motors/Motor.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" #include "modules/heaters/heaters.h" - +#include "modules/general/process.h" ////////////////////////////////State machine operation//////////////////////////////////// //the state machine operation is used to operate in runtime correct profile flow execution //by recieved esign flow of the user from the UI @@ -543,8 +543,13 @@ uint32_t ThreadPreSegmentState(void *JobDetails) //set the speed only before the first segment, speed is constant accros job JobTicket* JobTicket = JobDetails; - float process_speed; - if (JobTicket->processparameters) + float process_speed = dyeingspeed; + if (dyeingspeed == 0) + { + LOG_ERROR (-1," unknown job speed"); + return ERROR; + } + /*if (JobTicket->processparameters) if (JobTicket->processparameters->dyeingspeed) process_speed= JobTicket->processparameters->dyeingspeed; else @@ -552,7 +557,7 @@ uint32_t ThreadPreSegmentState(void *JobDetails) LOG_ERROR (-1," unknown job speed"); return ERROR; } - + */ SetOriginMotorSpeed(process_speed); ThreadControlActive = true; // set the new speed in the dryer motor to the speed of the new segment diff --git a/Software/Stubs Collection/stubs/AbortJob.cs b/Software/Stubs Collection/stubs/AbortJob.cs index 39dc6d083..6e53be9c3 100644 --- a/Software/Stubs Collection/stubs/AbortJob.cs +++ b/Software/Stubs Collection/stubs/AbortJob.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Tango.PMR.Printing; -using Tango.Stubs; +using Tango.Stubs.UI; public void OnExecute(StubManager stubManager) { diff --git a/Software/Stubs Collection/stubs/DeskSystemThreadMotorsDefinition.cs b/Software/Stubs Collection/stubs/DeskSystemThreadMotorsDefinition.cs new file mode 100644 index 000000000..0d4e1f55c --- /dev/null +++ b/Software/Stubs Collection/stubs/DeskSystemThreadMotorsDefinition.cs @@ -0,0 +1,308 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +HardwarePidControl FeederPidControl = new HardwarePidControl(); +FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder; +FeederPidControl.OutputProportionalPowerLimit = 80; +FeederPidControl.OutputProportionalBand = 5; +FeederPidControl.IntegralTime = 5; +FeederPidControl.DerivativeTime = 0; +FeederPidControl.SensorCorrectionAdjustment = 0; +FeederPidControl.SensorMinValue = 0; +FeederPidControl.SensorMaxValue = 0; +FeederPidControl.SetPointRampRateorSoftStartRamp = 0; +FeederPidControl.SetPointControlOutputRate = 4; +FeederPidControl.ControlOutputType = 0; +FeederPidControl.SsrControlOutputType = 0; +FeederPidControl.OutputOnOffHysteresisValue = 0; +FeederPidControl.ProcessVariableSamplingRate = 1000; +FeederPidControl.PvInputFilterFactorMode = 4; +FeederPidControl.OutputProportionalCycleTime = 0; +FeederPidControl.AcHeatersHalfCycleTime = 0; +FeederPidControl.ProportionalGain = 11.0; + + +HardwarePidControl PoolerPidControl = new HardwarePidControl(); +PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler; +PoolerPidControl.OutputProportionalPowerLimit = 80; +PoolerPidControl.OutputProportionalBand = 5; +PoolerPidControl.IntegralTime = 5; +PoolerPidControl.DerivativeTime = 0; +PoolerPidControl.SensorCorrectionAdjustment = 0; +PoolerPidControl.SensorMinValue = 0; +PoolerPidControl.SensorMaxValue = 0; +PoolerPidControl.SetPointRampRateorSoftStartRamp = 0; +PoolerPidControl.SetPointControlOutputRate = 4; +PoolerPidControl.ControlOutputType = 0; +PoolerPidControl.SsrControlOutputType = 0; +PoolerPidControl.OutputOnOffHysteresisValue = 0; +PoolerPidControl.ProcessVariableSamplingRate = 1000; +PoolerPidControl.PvInputFilterFactorMode = 4; +PoolerPidControl.OutputProportionalCycleTime = 0; +PoolerPidControl.AcHeatersHalfCycleTime = 0; +PoolerPidControl.ProportionalGain = 11.0; + + +HardwarePidControl WinderPidControl = new HardwarePidControl(); +WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder; +WinderPidControl.OutputProportionalPowerLimit = 80; +WinderPidControl.OutputProportionalBand = 5; +WinderPidControl.IntegralTime = 5; +WinderPidControl.DerivativeTime = 0; +WinderPidControl.SensorCorrectionAdjustment = 0; +WinderPidControl.SensorMinValue = 0; +WinderPidControl.SensorMaxValue = 0; +WinderPidControl.SetPointRampRateorSoftStartRamp = 0; +WinderPidControl.SetPointControlOutputRate = 4; +WinderPidControl.ControlOutputType = 0; +WinderPidControl.SsrControlOutputType = 0; +WinderPidControl.OutputOnOffHysteresisValue = 0; +WinderPidControl.ProcessVariableSamplingRate = 1000; +WinderPidControl.PvInputFilterFactorMode = 4; +WinderPidControl.OutputProportionalCycleTime = 0; +WinderPidControl.AcHeatersHalfCycleTime = 0; +WinderPidControl.ProportionalGain = 11.0; + + +HardwareDancer FeederDancer = new HardwareDancer(); +FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer; +FeederDancer.Gradual = false; +FeederDancer.K = 0; +FeederDancer.X = 0; +FeederDancer.PulsePerMmSpring = 0; +FeederDancer.MaximalMovementMm = 15; +FeederDancer.ZeroPoint = 9805; +FeederDancer.ResolutionBits = 14; +FeederDancer.ArmLength = 126; + +HardwareDancer PoolerDancer = new HardwareDancer(); +PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer; +PoolerDancer.Gradual = false; +PoolerDancer.K = 0; +PoolerDancer.X = 0; +PoolerDancer.PulsePerMmSpring = 0; +PoolerDancer.MaximalMovementMm = 15; +PoolerDancer.ZeroPoint = 6820; +PoolerDancer.ResolutionBits = 14; +PoolerDancer.ArmLength = 126; + +HardwareDancer WinderDancer = new HardwareDancer(); +WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer; +WinderDancer.Gradual = false; +WinderDancer.K = 0; +WinderDancer.X = 0; +WinderDancer.PulsePerMmSpring = 0; +WinderDancer.MaximalMovementMm = 15; +WinderDancer.ZeroPoint = 9242; +WinderDancer.ResolutionBits = 14; +WinderDancer.ArmLength = 126; + +HardwareMotor FeederMotor = new HardwareMotor(); +FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving; +FeederMotor.MinFrequency = 0; +FeederMotor.MaxFrequency = 1000000; +FeederMotor.SetMicroStep = 1; +FeederMotor.MicroStep = 1; +FeederMotor.MaxChangeSlope = 10000; +FeederMotor.HighLengthMicroSecond = 0; +FeederMotor.SpeedMaster = false; +FeederMotor.PulsePerRound = 200; +FeederMotor.PulleyRadius = 1.25; +FeederMotor.ConfigWord = 0x1C80; +FeederMotor.DirectionThreadWize = true; +FeederMotor.KvalHold = 0x35; +FeederMotor.KvalRun = 0x7f; +FeederMotor.KvalAcc = 0x7f; +FeederMotor.KvalDec = 0x7f; +FeederMotor.OverCurrentThreshold = 7; +FeederMotor.StallThreshold = 0x1F; +FeederMotor.ThermalCompensationFactor = 0; +FeederMotor.LowSpeedOptimization = false; +FeederMotor.StSlp = 0x20; +FeederMotor.IntSpd = 0x1A13; +FeederMotor.FnSlpAcc = 0x50; +FeederMotor.FnSlpDec = 0x50; + +HardwareMotor DryerMotor = new HardwareMotor(); +DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; +DryerMotor.MinFrequency = 0; +DryerMotor.MaxFrequency = 1000000; +DryerMotor.SetMicroStep = 1; +DryerMotor.MicroStep = 1; +DryerMotor.MaxChangeSlope = 1000; +DryerMotor.HighLengthMicroSecond = 0; +DryerMotor.SpeedMaster = true; +DryerMotor.PulsePerRound = 200; +DryerMotor.PulleyRadius = 1.05; +DryerMotor.ConfigWord = 0x1c80; +DryerMotor.DirectionThreadWize = true; +DryerMotor.KvalHold = 0x35; +DryerMotor.KvalRun = 0x7f; +DryerMotor.KvalAcc = 0x7f; +DryerMotor.KvalDec = 0x7f; +DryerMotor.OverCurrentThreshold = 7; +DryerMotor.StallThreshold = 0x1F; +DryerMotor.ThermalCompensationFactor = 0; +DryerMotor.LowSpeedOptimization = false; +DryerMotor.StSlp = 0x20; +DryerMotor.IntSpd = 0x1A13; +DryerMotor.FnSlpAcc = 0x50; +DryerMotor.FnSlpDec = 0x50; + +HardwareMotor PoolerMotor = new HardwareMotor(); +PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; +PoolerMotor.MinFrequency = 0; +PoolerMotor.MaxFrequency = 1000000; +PoolerMotor.SetMicroStep = 1; +PoolerMotor.MicroStep = 8; +PoolerMotor.MaxChangeSlope = 10000; +PoolerMotor.HighLengthMicroSecond = 0; +PoolerMotor.SpeedMaster = false; +PoolerMotor.PulsePerRound = 200; +PoolerMotor.PulleyRadius = 1.25; +PoolerMotor.ConfigWord = 0x1C80; +PoolerMotor.DirectionThreadWize = true; +PoolerMotor.KvalHold = 0x35; +PoolerMotor.KvalRun = 0x7f; +PoolerMotor.KvalAcc = 0x7f; +PoolerMotor.KvalDec = 0x7f; +PoolerMotor.OverCurrentThreshold = 7; +PoolerMotor.StallThreshold = 0x1F; +PoolerMotor.ThermalCompensationFactor = 0; +PoolerMotor.LowSpeedOptimization = false; +PoolerMotor.StSlp = 20; +PoolerMotor.IntSpd = 0x1A13; +PoolerMotor.FnSlpAcc = 0x50; +PoolerMotor.FnSlpDec = 0x50; + +HardwareMotor WinderMotor = new HardwareMotor(); +WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; +WinderMotor.MinFrequency = 0; +WinderMotor.MaxFrequency = 1000000; +WinderMotor.SetMicroStep = 1; +WinderMotor.MicroStep = 16; +WinderMotor.MaxChangeSlope = 10000; +WinderMotor.HighLengthMicroSecond = 0; +WinderMotor.SpeedMaster = false; +WinderMotor.PulsePerRound = 200; +WinderMotor.PulleyRadius = 1.68; +WinderMotor.ConfigWord = 0x1c80; +WinderMotor.DirectionThreadWize = false; +WinderMotor.KvalHold = 0x0F; +WinderMotor.KvalRun = 0x15; +WinderMotor.KvalAcc = 0x15; +WinderMotor.KvalDec = 0x15; +WinderMotor.OverCurrentThreshold = 7; +WinderMotor.StallThreshold = 0x1F; +WinderMotor.ThermalCompensationFactor = 0; +WinderMotor.LowSpeedOptimization = false; +WinderMotor.StSlp = 0x18; +WinderMotor.IntSpd = 0x22C5; +WinderMotor.FnSlpAcc = 0x22; +WinderMotor.FnSlpDec = 0x22; + +HardwareMotor ScrewMotor = new HardwareMotor(); +ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; +ScrewMotor.MinFrequency = 0; +ScrewMotor.MaxFrequency = 1000000; +ScrewMotor.SetMicroStep = 1; +ScrewMotor.MicroStep = 8; +ScrewMotor.MaxChangeSlope = 10000; +ScrewMotor.HighLengthMicroSecond = 0; +ScrewMotor.SpeedMaster = false; +ScrewMotor.PulsePerRound = 200; +ScrewMotor.PulleyRadius = 1.25; +ScrewMotor.ConfigWord = 0x1C80; +ScrewMotor.DirectionThreadWize = true; +ScrewMotor.KvalHold = 0x0F; +ScrewMotor.KvalRun = 0x15; +ScrewMotor.KvalAcc = 0x15; +ScrewMotor.KvalDec = 0x15; +ScrewMotor.OverCurrentThreshold = 7; +ScrewMotor.StallThreshold = 0x1F; +ScrewMotor.ThermalCompensationFactor = 0; +ScrewMotor.LowSpeedOptimization = false; +ScrewMotor.StSlp = 0x18; +ScrewMotor.IntSpd = 0x22C5; +ScrewMotor.FnSlpAcc = 0x22; +ScrewMotor.FnSlpDec = 0x22; + +HardwareMotor LeftRockerMotor = new HardwareMotor(); +LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading; +LeftRockerMotor.MinFrequency = 0; +LeftRockerMotor.MaxFrequency = 1000000; +LeftRockerMotor.SetMicroStep = 1; +LeftRockerMotor.MicroStep = 4; +LeftRockerMotor.MaxChangeSlope = 10000; +LeftRockerMotor.HighLengthMicroSecond = 0; +LeftRockerMotor.SpeedMaster = false; +LeftRockerMotor.PulsePerRound = 200; +LeftRockerMotor.PulleyRadius = 1.3; +LeftRockerMotor.ConfigWord = 0xC80; +LeftRockerMotor.DirectionThreadWize = false; +LeftRockerMotor.KvalHold = 0x28; +LeftRockerMotor.KvalRun = 0x5f; +LeftRockerMotor.KvalAcc = 0x5f; +LeftRockerMotor.KvalDec = 0x5f; +LeftRockerMotor.OverCurrentThreshold = 7; +LeftRockerMotor.StallThreshold = 0x1F; +LeftRockerMotor.ThermalCompensationFactor = 0; +LeftRockerMotor.LowSpeedOptimization = false; +LeftRockerMotor.StSlp = 6; +LeftRockerMotor.IntSpd = 0x44B8; +LeftRockerMotor.FnSlpAcc = 0x14; +LeftRockerMotor.FnSlpDec = 0x14; + + +HardwareMotor RightRockerMotor = new HardwareMotor(); +RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; +RightRockerMotor.MinFrequency = 0; +RightRockerMotor.MaxFrequency = 1000000; +RightRockerMotor.SetMicroStep = 1; +RightRockerMotor.MicroStep = 4; +RightRockerMotor.MaxChangeSlope = 10000; +RightRockerMotor.HighLengthMicroSecond = 0; +RightRockerMotor.SpeedMaster = false; +RightRockerMotor.PulsePerRound = 200; +RightRockerMotor.PulleyRadius = 1.3; +RightRockerMotor.ConfigWord = 0xC80; +RightRockerMotor.DirectionThreadWize = true; +RightRockerMotor.KvalHold = 0x28; +RightRockerMotor.KvalRun = 0x5f; +RightRockerMotor.KvalAcc = 0x5f; +RightRockerMotor.KvalDec = 0x5f; +RightRockerMotor.OverCurrentThreshold = 7; +RightRockerMotor.StallThreshold = 0x1F; +RightRockerMotor.ThermalCompensationFactor = 0; +RightRockerMotor.LowSpeedOptimization = false; +RightRockerMotor.StSlp = 6; +RightRockerMotor.IntSpd = 0x44B8; +RightRockerMotor.FnSlpAcc = 0x14; +RightRockerMotor.FnSlpDec = 0x14; + +//hardwareConfiguration.Motors.Add(FeederMotor); +//hardwareConfiguration.Motors.Add(WinderMotor); +//hardwareConfiguration.Motors.Add(DryerMotor); +//hardwareConfiguration.Motors.Add(PoolerMotor); +//hardwareConfiguration.Motors.Add(ScrewMotor); +//hardwareConfiguration.Motors.Add(LeftRockerMotor); +//hardwareConfiguration.Motors.Add(RightRockerMotor); + +//hardwareConfiguration.PidControls.Add(FeederPidControl); +//hardwareConfiguration.PidControls.Add(PoolerPidControl); +//hardwareConfiguration.PidControls.Add(WinderPidControl); + +//hardwareConfiguration.Dancers.Add(FeederDancer); +//hardwareConfiguration.Dancers.Add(PoolerDancer); +//hardwareConfiguration.Dancers.Add(WinderDancer); diff --git a/Software/Stubs Collection/stubs/Ext_Flash_Write.cs b/Software/Stubs Collection/stubs/Ext_Flash_Write.cs new file mode 100644 index 000000000..44ea691d9 --- /dev/null +++ b/Software/Stubs Collection/stubs/Ext_Flash_Write.cs @@ -0,0 +1,16 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubExtFlashWriteRequest" ,44, 7, 96, 74, 255);//0..255 +} + diff --git a/Software/Stubs Collection/stubs/Ext_Flash_read.cs b/Software/Stubs Collection/stubs/Ext_Flash_read.cs new file mode 100644 index 000000000..aabd177fe --- /dev/null +++ b/Software/Stubs Collection/stubs/Ext_Flash_read.cs @@ -0,0 +1,16 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubExtFlashReadRequest" ,5);//0..5 +} + diff --git a/Software/Stubs Collection/stubs/FPGA_test_reg.cs b/Software/Stubs Collection/stubs/FPGA_test_reg.cs new file mode 100644 index 000000000..c8a31cf8b --- /dev/null +++ b/Software/Stubs Collection/stubs/FPGA_test_reg.cs @@ -0,0 +1,22 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + for (int i = 1; i < 4; i++) + { + var response = stubManager.Run<StubFPGAReadBackRegResponse>("StubFPGAReadBackRegRequest" ,i, 0xAAAA); + stubManager.WriteLineHex(response.ReadBackValue,8); + } +} + diff --git a/Software/Stubs Collection/stubs/GPI_F1_GPI_TFEED_BREAK_1.cs b/Software/Stubs Collection/stubs/GPI_F1_GPI_TFEED_BREAK_1.cs new file mode 100644 index 000000000..f9a1acc64 --- /dev/null +++ b/Software/Stubs Collection/stubs/GPI_F1_GPI_TFEED_BREAK_1.cs @@ -0,0 +1,28 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + + +const Int32 FPGA1 = 0x60000000; + + + + const Int32 F1_GPI_EXTWINDER_Direct = 0x70; +Int32 loop = 1; +public void OnExecute(StubManager stubManager) +{ + while(loop == 1) + { + var response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" , FPGA1 + F1_GPI_EXTWINDER_Direct); + Thread.Sleep(1000); + stubManager.WritelineHex(response.Value,4); + } +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/GREEN LED ON.cs b/Software/Stubs Collection/stubs/GREEN LED ON.cs new file mode 100644 index 000000000..f7627e1f9 --- /dev/null +++ b/Software/Stubs Collection/stubs/GREEN LED ON.cs @@ -0,0 +1,16 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, true); +} + diff --git a/Software/Stubs Collection/stubs/GREEN LED Off.cs b/Software/Stubs Collection/stubs/GREEN LED Off.cs new file mode 100644 index 000000000..c605f617f --- /dev/null +++ b/Software/Stubs Collection/stubs/GREEN LED Off.cs @@ -0,0 +1,16 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false); +} + diff --git a/Software/Stubs Collection/stubs/HW Version.cs b/Software/Stubs Collection/stubs/HW Version.cs new file mode 100644 index 000000000..1fdb80b77 --- /dev/null +++ b/Software/Stubs Collection/stubs/HW Version.cs @@ -0,0 +1,16 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubHWVersionRequest"); +} + diff --git a/Software/Stubs Collection/stubs/HardwareConfiguration.cs b/Software/Stubs Collection/stubs/HardwareConfiguration.cs index 3e49edf5b..5960e7730 100644 --- a/Software/Stubs Collection/stubs/HardwareConfiguration.cs +++ b/Software/Stubs Collection/stubs/HardwareConfiguration.cs @@ -12,12 +12,12 @@ using Tango.PMR.Printing; using Tango.PMR.Stubs; using Tango.Stubs; -include "D:\stubs\addedfiles\ACHeatersDefinition.cs" -include "D:\stubs\addedfiles\DCHeatersDefinition.cs" -include "D:\stubs\addedfiles\MotorsConfiguration.cs" -include "D:\stubs\addedfiles\DispensersConfiguration.cs" -include "D:\stubs\addedfiles\DancersConfiguration.cs" -include "D:\stubs\addedfiles\PID_Configuration.cs" +include "C:\Tango\Software\Stubs Collection\stubs\addedfiles\ACHeatersDefinition.cs" +include "C:\Tango\Software\Stubs Collection\stubs\addedfiles\DCHeatersDefinition.cs" +include "C:\Tango\Software\Stubs Collection\stubs\addedfiles\MotorsConfiguration.cs" +include "C:\Tango\Software\Stubs Collection\stubs\addedfiles\DispensersConfiguration.cs" +include "C:\Tango\Software\Stubs Collection\stubs\addedfiles\DancersConfiguration.cs" +include "C:\Tango\Software\Stubs Collection\stubs\addedfiles\PID_Configuration.cs" public void OnExecute(StubManager stubManager) { @@ -49,11 +49,13 @@ UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new Uplo HardwareConfiguration hardwareConfiguration = new HardwareConfiguration(); -//hardwareConfiguration.PidControls.Add(HeadZ1Heater); -//hardwareConfiguration.PidControls.Add(HeadZ2Heater); -//hardwareConfiguration.PidControls.Add(HeadZ3Heater); -//hardwareConfiguration.PidControls.Add(HeadZ4Heater); -//hardwareConfiguration.PidControls.Add(MixerHeater); +hardwareConfiguration.PidControls.Add(HeadZ1Heater); +hardwareConfiguration.PidControls.Add(HeadZ2Heater); +hardwareConfiguration.PidControls.Add(HeadZ3Heater); +hardwareConfiguration.PidControls.Add(HeadZ4Heater); +hardwareConfiguration.PidControls.Add(HeadZ5Heater); +hardwareConfiguration.PidControls.Add(HeadZ6Heater); +//hardwareConfiguration.PidControls.Add(MixerHeater); //head5 //hardwareConfiguration.PidControls.Add(DryerHeater1000); //hardwareConfiguration.PidControls.Add(DryerHeater200w1); @@ -67,11 +69,11 @@ hardwareConfiguration.Motors.Add(ScrewMotor); //hardwareConfiguration.Motors.Add(LeftRockerMotor); //hardwareConfiguration.Motors.Add(RightRockerMotor); //hardwareConfiguration.Motors.Add(Dispenser4Motor); -hardwareConfiguration.Motors.Add(Dispenser7Motor); -hardwareConfiguration.Motors.Add(Dispenser8Motor); +//hardwareConfiguration.Motors.Add(Dispenser7Motor); +//hardwareConfiguration.Motors.Add(Dispenser8Motor); -hardwareConfiguration.Dispensers.Add(hardware7Dispenser); -hardwareConfiguration.Dispensers.Add(hardware8Dispenser); +//hardwareConfiguration.Dispensers.Add(hardware7Dispenser); +//hardwareConfiguration.Dispensers.Add(hardware8Dispenser); hardwareConfiguration.PidControls.Add(FeederPidControl); hardwareConfiguration.PidControls.Add(PoolerPidControl); diff --git a/Software/Stubs Collection/stubs/Head Heaters + PT100.cs b/Software/Stubs Collection/stubs/Head Heaters + PT100.cs new file mode 100644 index 000000000..9bea4da02 --- /dev/null +++ b/Software/Stubs Collection/stubs/Head Heaters + PT100.cs @@ -0,0 +1,38 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +const Int32 FPGA1_BASE = 0x60000000; +const Int32 FPGA2_BASE = 0x60000400; +const Int32 FPGA3_BASE = 0x60000800; + +const Int32 F2_CTRL = 0x0E2; ////HeadHeaterZ 1-4 +const Int32 F1_gpo_01 = 0x3D2; //HeadHeaterZ5 +const Int32 F3_GPO_01_bus = 0x0C2; //HeadHeaterZ6 + +public void OnExecute(StubManager stubManager) +{ +/* + //stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,FPGA1_BASE | F1_gpo_01, 0x0004); // turn ON HeadHeaterZ5 - DYEINGH_SSR10_CTRL + var response = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,5); //measer the teperature + stubManager.Write(response.TemperatureCMultBy100); + stubManager.Write("\n\n"); + + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,FPGA1_BASE | F1_gpo_01, 0x0000); // turn OFF HeadHeaterZ5 - DYEINGH_SSR10_CTRL + */ + + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,FPGA3_BASE | F3_GPO_01_bus, 0x0010); // turn ON HeadHeaterZ6 - DYEINGH_SSR11_CTRL + var response = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,0); //measer the teperature + stubManager.Write(response.TemperatureCMultBy100); + stubManager.Write("\n\n"); + + //stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,FPGA3_BASE | F3_GPO_01_bus, 0x0000); // turn OFF HeadHeaterZ6 - DYEINGH_SSR11_CTRL +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/I2C.cs b/Software/Stubs Collection/stubs/I2C.cs new file mode 100644 index 000000000..f1347c655 --- /dev/null +++ b/Software/Stubs Collection/stubs/I2C.cs @@ -0,0 +1,168 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ +// Request ---- +// UInt32 : I2CId +// UInt32 : SlaveAddress +// Boolean : ReadOrWrite +// UInt32 : ByteToWrite + +// Response ---- +// UInt32 : I2CId +// UInt32 : ReadByte +// String : Status +// UInt32 : StatusWord + stubManager.Run<StubI2CResponse>("StubI2CRequest" ,4, 0xE0, false, 0x11);//false to write + var response = stubManager.Run<StubI2CResponse>("StubI2CRequest" ,4, 0xE0, true, 0);//true to read + stubManager.WriteLineHex(response.ReadByte,8); + + stubManager.Run<StubI2CResponse>("StubI2CRequest" ,4, 0xE4, false, 0x22);//false to write + var response1 = stubManager.Run<StubI2CResponse>("StubI2CRequest" ,4, 0xE4, true, 0);//true to read + stubManager.WriteLineHex(response1.ReadByte,8); + + stubManager.Run<StubI2CResponse>("StubI2CRequest" ,4, 0xE3, false, 0x33);//false to write + var response2 = stubManager.Run<StubI2CResponse>("StubI2CRequest" ,4, 0xE3, true, 0);//true to read + stubManager.WriteLineHex(response2.ReadByte,8); + + stubManager.Run<StubI2CResponse>("StubI2CRequest" ,3, 0xE0, false, 0x44);//false to write + var response3 = stubManager.Run<StubI2CResponse>("StubI2CRequest" ,3, 0xE0, true, 0);//true to read + stubManager.WriteLineHex(response3.ReadByte,8); + + stubManager.Run<StubI2CResponse>("StubI2CRequest" ,3, 0xE4, false, 0x55);//false to write + var response4 = stubManager.Run<StubI2CResponse>("StubI2CRequest" ,3, 0xE4, true, 0);//true to read + stubManager.WriteLineHex(response4.ReadByte,8); + + stubManager.Run<StubI2CResponse>("StubI2CRequest" ,3, 0xE3, false, 0x66);//false to write + var response5 = stubManager.Run<StubI2CResponse>("StubI2CRequest" ,3, 0xE3, true, 0);//true to read + stubManager.WriteLineHex(response5.ReadByte,8); + +} +/* +17:59:50.54: Executing script 'I2C.cs'... +17:59:50.78: Executing 'StubI2CRequest'... +17:59:50.78: Executing 'StubI2CRequest'... +17:59:50.80: Response Received: +17:59:50.80: { + "I2CId": 4, + "ReadByte": 0, + "Status": "PASSED", + "StatusWord": 0 +} +17:59:50.81: Executing 'StubI2CRequest'... +17:59:50.81: Executing 'StubI2CRequest'... +17:59:50.83: Response Received: +17:59:50.83: { + "I2CId": 4, + "ReadByte": 17, + "Status": "PASSED", + "StatusWord": 0 +} +#00000011 +17:59:50.83: Executing 'StubI2CRequest'... +17:59:50.83: Executing 'StubI2CRequest'... +17:59:50.86: Response Received: +17:59:50.86: { + "I2CId": 4, + "ReadByte": 0, + "Status": "PASSED", + "StatusWord": 0 +} +17:59:50.86: Executing 'StubI2CRequest'... +17:59:50.86: Executing 'StubI2CRequest'... +17:59:50.88: Response Received: +17:59:50.88: { + "I2CId": 4, + "ReadByte": 34, + "Status": "PASSED", + "StatusWord": 0 +} +#00000022 +17:59:50.89: Executing 'StubI2CRequest'... +17:59:50.89: Executing 'StubI2CRequest'... +17:59:50.91: Response Received: +17:59:50.91: { + "I2CId": 4, + "ReadByte": 0, + "Status": "PASSED", + "StatusWord": 0 +} +17:59:50.91: Executing 'StubI2CRequest'... +17:59:50.91: Executing 'StubI2CRequest'... +17:59:50.94: Response Received: +17:59:50.94: { + "I2CId": 4, + "ReadByte": 51, + "Status": "PASSED", + "StatusWord": 0 +} +#00000033 +17:59:50.94: Executing 'StubI2CRequest'... +17:59:50.94: Executing 'StubI2CRequest'... +17:59:50.96: Response Received: +17:59:50.96: { + "I2CId": 3, + "ReadByte": 0, + "Status": "PASSED", + "StatusWord": 0 +} +17:59:50.97: Executing 'StubI2CRequest'... +17:59:50.97: Executing 'StubI2CRequest'... +17:59:50.99: Response Received: +17:59:50.99: { + "I2CId": 3, + "ReadByte": 68, + "Status": "PASSED", + "StatusWord": 0 +} +#00000044 +17:59:50.99: Executing 'StubI2CRequest'... +17:59:50.99: Executing 'StubI2CRequest'... +17:59:51.02: Response Received: +17:59:51.02: { + "I2CId": 3, + "ReadByte": 0, + "Status": "PASSED", + "StatusWord": 0 +} +17:59:51.02: Executing 'StubI2CRequest'... +17:59:51.02: Executing 'StubI2CRequest'... +17:59:51.04: Response Received: +17:59:51.04: { + "I2CId": 3, + "ReadByte": 85, + "Status": "PASSED", + "StatusWord": 0 +} +#00000055 +17:59:51.05: Executing 'StubI2CRequest'... +17:59:51.05: Executing 'StubI2CRequest'... +17:59:51.07: Response Received: +17:59:51.07: { + "I2CId": 3, + "ReadByte": 0, + "Status": "PASSED", + "StatusWord": 0 +} +17:59:51.07: Executing 'StubI2CRequest'... +17:59:51.07: Executing 'StubI2CRequest'... +17:59:51.09: Response Received: +17:59:51.09: { + "I2CId": 3, + "ReadByte": 102, + "Status": "PASSED", + "StatusWord": 0 +} +#00000066 + +*/
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/I2C_MultiByets.cs b/Software/Stubs Collection/stubs/I2C_MultiByets.cs new file mode 100644 index 000000000..badc41618 --- /dev/null +++ b/Software/Stubs Collection/stubs/I2C_MultiByets.cs @@ -0,0 +1,51 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +//---------------------- +const Int32 I2C_ID = 4; +const Int32 I2C_Slave_Add = 0xE0; +//---------------------- + +public void OnExecute(StubManager stubManager) +{ + +// --------------------- write multibyte I2C --------------------- +StubI2CRequest stubI2CRequest = new StubI2CRequest(); +stubI2CRequest.I2CId = I2C_ID; +stubI2CRequest.SlaveAddress = I2C_Slave_Add; +stubI2CRequest.ReadOrWrite = false;//Write +//stubI2CRequest.ByteToWrite = 0x11; +//stubI2CRequest.NumberOfBytesToRead = 0; + +UInt32 uInt32 = new UInt32(); +stubI2CRequest.BytesTWrite.Add(0x11); +stubI2CRequest.BytesTWrite.Add(0x22); + + +var response = stubManager.Run<StubI2CResponse>(stubI2CRequest); + +// --------------------- Read multibyte I2C --------------------- +StubI2CRequest stubI2CRequest1 = new StubI2CRequest(); +stubI2CRequest1.I2CId = I2C_ID; +stubI2CRequest1.SlaveAddress = I2C_Slave_Add; +stubI2CRequest1.ReadOrWrite = true;//Read +//stubI2CRequest1.ByteToWrite = 0; +stubI2CRequest1.NumberOfBytesToRead = 1; + +//UInt32 uInt32_1 = new UInt32(); +//stubI2CRequest1.BytesTWrite.Add(0); + +var response1 = stubManager.Run<StubI2CResponse>(stubI2CRequest1); +stubManager.WriteLineHex(response1.ReadByte,8); + + +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/I2C_RW_MultiByets.cs b/Software/Stubs Collection/stubs/I2C_RW_MultiByets.cs new file mode 100644 index 000000000..58389a58c --- /dev/null +++ b/Software/Stubs Collection/stubs/I2C_RW_MultiByets.cs @@ -0,0 +1,58 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +//---------------------- +//I2C4: +// Switches address: 0xE0, 0xE4, 0xE3 +//I2C3 +// Switches address: 0xE0, 0xE4, 0xE3 +// ADC address: 0x40, 0x44, 0x46 +//I2C2 +// DAC address: 0x98 +// EEPROM address: 0xA0 + +//---------------------- +const Int32 I2C_ID = 4; +const Int32 I2C_Slave_Add = 0xE0; +//---------------------- + +public void OnExecute(StubManager stubManager) +{ + + // --------------------- I2C write multibyte --------------------- + StubI2CWriteBytesRequest stubI2CWriteBytesRequest = new StubI2CWriteBytesRequest(); + stubI2CWriteBytesRequest.I2CId = I2C_ID; + stubI2CWriteBytesRequest.SlaveAddress = I2C_Slave_Add; + + UInt32 uInt32 = new UInt32(); + stubI2CWriteBytesRequest.BytesTWrite.Add(0x11);//Byte 0 to write + //stubI2CWriteBytesRequest.BytesTWrite.Add(0x22);//Byte 1 to Write + //and so on,add lines in order to add Bytes - max : 256 + + var response = stubManager.Run<StubI2CWriteBytesResponse>(stubI2CWriteBytesRequest); + + + // --------------------- I2C Read multibyte --------------------- + + StubI2CReadBytesRequest stubI2CReadBytesRequest = new StubI2CReadBytesRequest(); + stubI2CReadBytesRequest.I2CId = I2C_ID; + stubI2CReadBytesRequest.SlaveAddress = I2C_Slave_Add; + stubI2CReadBytesRequest.NumberOfBytesToRead = 1; // Number of bytes to read + + var response1 = stubManager.Run<StubI2CReadBytesResponse>(stubI2CReadBytesRequest); + + for(int i=0; i<stubI2CReadBytesRequest.NumberOfBytesToRead;i++) + { + stubManager.WriteLineHex(response1.ReadBytes[0],2); + } + +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/Int_ADC.cs b/Software/Stubs Collection/stubs/Int_ADC.cs new file mode 100644 index 000000000..29c4a423e --- /dev/null +++ b/Software/Stubs Collection/stubs/Int_ADC.cs @@ -0,0 +1,31 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + // Request ---- + // UInt32 : ADCDevice + + // Response ---- + // UInt32 : ADCDevice + // Int32 : SamplingInBits + // Int32 : VoltageSamplingMv + // String : Status + // UInt32 : StatusWord + for (int i = 0; i < 20; i++) + { + Thread.Sleep(1000); + var response = stubManager.Run<StubIntADCReadResponse>("StubIntADCReadRequest" ,i); // 4 J0042 ,PIN 21 - AN_IDS_PRESSENS_3, PIN 9 - GND + } + +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/JobRequest 2 segments 2 dispensers no intersegment.cs b/Software/Stubs Collection/stubs/JobRequest 2 segments 2 dispensers no intersegment.cs index b9ab3339b..a00f600b4 100644 --- a/Software/Stubs Collection/stubs/JobRequest 2 segments 2 dispensers no intersegment.cs +++ b/Software/Stubs Collection/stubs/JobRequest 2 segments 2 dispensers no intersegment.cs @@ -34,13 +34,13 @@ JobRequest jobRequest = new JobRequest(); JobTicket jobTicket = new JobTicket(); jobTicket.Name = "Stubs Job"; -jobTicket.EnableInterSegment = false; -jobTicket.InterSegmentLength = 50; +jobTicket.EnableInterSegment = true; +jobTicket.InterSegmentLength = 10.0; jobTicket.Length = 1000; -ProcessParameters processParameters = new ProcessParameters(); +/*ProcessParameters processParameters = new ProcessParameters(); // SPEEED -processParameters.DyeingSpeed = 30; +processParameters.DyeingSpeed = 25; // HEAT processParameters.DryerZone1Temp = 100; @@ -61,6 +61,7 @@ processParameters.DryerAirFlow = 0; processParameters.TableIndex = 0; jobTicket.ProcessParameters = processParameters; +*/ jobTicket.WindingMethod = Tango.PMR.Printing.JobWindingMethod.Embroidery; JobSpool jobSpool = new JobSpool(); @@ -79,7 +80,7 @@ jobTicket.Spool = jobSpool; JobSegment jobSegment1 = new JobSegment(); jobSegment1.Name = "Segment1"; // LENGTH -jobSegment1.Length = 5.0; +jobSegment1.Length = 150.0; JobBrushStop jobBrushStop1 = new JobBrushStop(); jobBrushStop1.Index = 0; @@ -90,7 +91,7 @@ JobDispenser jobDispenser1 = new JobDispenser(); jobDispenser1.Index = 6; jobDispenser1.Volume = 10; jobDispenser1.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto; -jobDispenser1.NanolitterPerSecond = 1000; +jobDispenser1.NanolitterPerSecond = 1500; jobDispenser1.NanoliterPerCentimeter = 10; jobDispenser1.PulsePerSecond = 0; jobDispenser1.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan; @@ -116,7 +117,7 @@ jobTicket.Segments.Add(jobSegment1); JobSegment jobSegment2 = new JobSegment(); jobSegment1.Name = "Segment2"; // LENGTH -jobSegment2.Length = 5.0; +jobSegment2.Length = 150.0; JobBrushStop jobBrushStop2 = new JobBrushStop(); jobBrushStop2.Index = 0; @@ -127,7 +128,7 @@ JobDispenser jobDispenser2 = new JobDispenser(); jobDispenser2.Index = 6; jobDispenser2.Volume = 10; jobDispenser2.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto; -jobDispenser2.NanolitterPerSecond = 100; +jobDispenser2.NanolitterPerSecond = 500; jobDispenser2.NanoliterPerCentimeter = 10; jobDispenser2.PulsePerSecond = 0; jobDispenser2.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan; @@ -153,7 +154,7 @@ jobTicket.Segments.Add(jobSegment2); jobRequest.JobTicket = jobTicket; - var response = stubManager.Run<JobResponse>(jobRequest); + //var response = stubManager.Run<JobResponse>(jobRequest); int i=0; /*stubManager.WriteLine("data.data length = " + jobRequest.CalculateSize()); */ diff --git a/Software/Stubs Collection/stubs/JobRequest.cs b/Software/Stubs Collection/stubs/JobRequest.cs index 9a7e8bc31..7e0f0b376 100644 --- a/Software/Stubs Collection/stubs/JobRequest.cs +++ b/Software/Stubs Collection/stubs/JobRequest.cs @@ -14,9 +14,8 @@ using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Tango.PMR.Printing; -using Tango.PMR.Diagnostics; using Tango.PMR.Stubs; -using Tango.Stubs; +using Tango.Stubs.UI; public void OnExecute(StubManager stubManager) { @@ -39,20 +38,16 @@ jobTicket.InterSegmentLength = 50; jobTicket.Length = 1000; ProcessParameters processParameters = new ProcessParameters(); -// SPEEED -processParameters.DyeingSpeed = 30; -// HEAT -processParameters.DryerZone1Temp = 100; - - -processParameters.MixerTemp = 0; +processParameters.DyeingSpeed = 50; +processParameters.MixerTemp = 60; processParameters.DryerBufferLength = 20; processParameters.MinInkUptake = 0; -processParameters.HeadZone1Temp = 50; -processParameters.HeadZone2Temp = 150; -processParameters.HeadZone3Temp = 150; -processParameters.DryerZone2Temp = 0; -processParameters.DryerZone3Temp = 0; +processParameters.HeadZone1Temp = 40; +processParameters.HeadZone2Temp = 40; +processParameters.HeadZone3Temp = 40; +processParameters.DryerZone1Temp = 40; +processParameters.DryerZone2Temp = 40; +processParameters.DryerZone3Temp = 40; processParameters.FeederTension = 0; processParameters.PullerTension = 0; processParameters.WinderTension = 0; @@ -68,18 +63,17 @@ jobSpool.JobSpoolType = Tango.PMR.Printing.JobSpoolType.StandardSpool; jobSpool.Length = 800; jobSpool.Weight = 0; jobSpool.Diameter = 3.0; -jobSpool.StartOffsetPulses = 250; +jobSpool.StartOffsetPulses = 600; jobSpool.BackingRate = 10; -jobSpool.SegmentOffsetPulses = 750; +jobSpool.SegmentOffsetPulses = 500; jobSpool.BottomBackingRate = 70; -jobSpool.RotationsPerPassage = 3; +jobSpool.RotationsPerPassage = 7; jobTicket.Spool = jobSpool; JobSegment jobSegment = new JobSegment(); jobSegment.Name = "Segment1"; -// LENGTH -jobSegment.Length = 30.0; +jobSegment.Length = 20.0; JobBrushStop jobBrushStop = new JobBrushStop(); jobBrushStop.Index = 0; @@ -87,15 +81,15 @@ jobBrushStop.OffsetPercent = 0; jobBrushStop.OffsetMeters = 0; JobDispenser jobDispenser = new JobDispenser(); -jobDispenser.Index = 6; +jobDispenser.Index = 2; jobDispenser.Volume = 10; jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto; -jobDispenser.NanolitterPerSecond = 500; +jobDispenser.NanolitterPerSecond = 10; jobDispenser.NanoliterPerCentimeter = 10; -jobDispenser.PulsePerSecond = 0; +jobDispenser.PulsePerSecond = 500; jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan; jobDispenser.LiquidMaxNanoliterPerCentimeter = 40; -jobDispenser.NanoliterPerPulse = 2.4; +jobDispenser.NanoliterPerPulse = 10; jobBrushStop.Dispensers.Add(jobDispenser); jobSegment.BrushStops.Add(jobBrushStop); jobTicket.Segments.Add(jobSegment); @@ -103,13 +97,13 @@ jobTicket.Segments.Add(jobSegment); jobRequest.JobTicket = jobTicket; - var response = stubManager.Run<JobResponse>(jobRequest); +// var response = stubManager.Run<JobResponse>(jobRequest); int i=0; -/*stubManager.WriteLine("data.data length = " + jobRequest.CalculateSize()); -*/ +stubManager.WriteLine("data.data length = " + jobRequest.CalculateSize()); + stubManager.RunContinuous<JobResponse>(jobRequest,(response1) => { - stubManager.WriteLine (String.Format("Data, {0}, {1} meters, {2}",++i,response1.Status.Progress*jobSegment.Length,response1.Status.Message)); + stubManager.WriteLine (String.Format("Data, {0}, %{1}, Segment {2}",++i,response1.Status.Progress*100,response1.Status.CurrentSegmentIndex)); }); /* stubManager.RunContinuous<ProgressResponse>(request, (response) => @@ -119,25 +113,13 @@ stubManager.RunContinuous<JobResponse>(jobRequest,(response1) => }); */ - - //int i=0; -/*stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) => +/* + int i=0; +stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) => { // stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage)); - stubManager.WriteLine (String.Format("Data, Id {0}, Id {1}, Temp {2}, % {3}, Active {4}, {5}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater1Active,response1.InfoMessage)); - - },0); - - -/*StartDiagnosticsRequest startDiagnosticsRequest = new StartDiagnosticsRequest(); -//stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) => -stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) => - { - stubManager.WriteLine (String.Format("Data, {0}, H1 {1}, H2{2}, H3 {3}, D1 {4}, D2 {5}",++i,response1.Monitors.HeadZone1Temperature[0],response1.Monitors.HeadZone2Temperature[0],response1.Monitors.HeadZone3Temperature[0],response1.Monitors.DryerZone1Temperature[0],response1.Monitors.DryerZone2Temperature[0])); - stubManager.WriteLine (String.Format("Data, {0}, DR {1}, DM{2}, DL {3}, Feeder {4}",++i,response1.Monitors.Dancer1Angle[0],response1.Monitors.Dancer2Angle[0],response1.Monitors.Dancer3Angle[0],response1.Monitors.FeederMotorFrequency[0])); + stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage)); },0); - */ -} - +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/L6470.cs b/Software/Stubs Collection/stubs/L6470.cs new file mode 100644 index 000000000..8be8fbd75 --- /dev/null +++ b/Software/Stubs Collection/stubs/L6470.cs @@ -0,0 +1,17 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + stubManager.Run("StubL6470DriverRequest" ,67109, 1, true, 0, true, true, 0, 0, 0, true, true, true, true, true, 0, 0, 0, 0, 0, 0); +} + diff --git a/Software/Stubs Collection/stubs/Ltfu_Motors.cs b/Software/Stubs Collection/stubs/Ltfu_Motors.cs new file mode 100644 index 000000000..f2d0dc78a --- /dev/null +++ b/Software/Stubs Collection/stubs/Ltfu_Motors.cs @@ -0,0 +1,115 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +const Int32 FPGA1 = 0x60000000; +const Int32 FPGA2 = 0x60000400; +const Int32 FPGA3 = 0x60000800; +const Int32 TEST_REG = 0x3f0; //F1 TEST_REG + +//TX 1-MSW 0-LSW +const Int32 MOTO_LDRIVING_1 = 0x0222; +const Int32 MOTO_LDRIVING_0 = 0x0220; +const Int32 MOTO_LLOADING_1 = 0x0232; +const Int32 MOTO_LLOADING_0 = 0x0230; +const Int32 MOTO_LDANCER1_1 = 0x02c2; +const Int32 MOTO_LDANCER1_0 = 0x02c0; +const Int32 MOTO_LDANCER2_1 = 0x02d2; +const Int32 MOTO_LDANCER2_0 = 0x02d0; +const Int32 MOTO_LPIVOT1_1 = 0x302; +const Int32 MOTO_LPIVOT1_0 = 0x300; + +int Motor_HighZ(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) +{ + + //Send "highz" command - 1 byte + var response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga+TEST_REG, 0xa800); + var respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga+HighAdr, 0xa800); // Stop x_HARD_HIZ 0xA8 + NOP + + //Send "nop" command - last 2 bytes + response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga+TEST_REG, 0x0000); + respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga+LowAdr, 0x0000); + + return 1; +} + +int Motor_Run(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) +{ + //Send "run" command - first 2 bytes + var response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga+TEST_REG, 0x5000); + var respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + HighAdr, 0x5000);//x_RUN 0x50 + Direction 0 + + + //Send "run" command - last 2 bytes + response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga+TEST_REG, 0xffff); + respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + LowAdr, 0xffff);//Max Speed + + return 1; +} + +int Motor_Move(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) +{ + + for (int i = 0; i < 8; i++) + { + //Send "Move" command - First 2 bytes - clockwise + var response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + TEST_REG, 0x4000); + var respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + HighAdr, 0x4000); //x_MOVE 0x40 + Direction 0 + + //Send "Move" command - last 2 bytes + response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + TEST_REG, 0x3200); + respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + LowAdr, 0x3200); // Position + + Thread.Sleep(800); + + //Send "Move" command - First 2 bytes - clockwise + response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + TEST_REG, 0x4100); + respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + HighAdr, 0x4100);//x_MOVE 0x40 + Direction 1 + + //Send "Move" command - last 2 bytes + response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + TEST_REG, 0x3200); + respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + LowAdr, 0x3200); //Position + + Thread.Sleep(800); + + } + + return 1; +} + + +public void OnExecute(StubManager stubManager) +{ + Motor_HighZ(FPGA1, MOTO_LDRIVING_1, MOTO_LDRIVING_0); + Motor_HighZ(FPGA1, MOTO_LLOADING_1, MOTO_LLOADING_0); + Motor_HighZ(FPGA1, MOTO_LDANCER1_1, MOTO_LDANCER1_0); + Motor_HighZ(FPGA1, MOTO_LDANCER2_1, MOTO_LDANCER2_0); + Motor_HighZ(FPGA1, MOTO_LPIVOT1_1, MOTO_LPIVOT1_0); + + Motor_Run(FPGA1, MOTO_LDRIVING_1, MOTO_LDRIVING_0); + Thread.Sleep(6000); + Motor_HighZ(FPGA1, MOTO_LDRIVING_1, MOTO_LDRIVING_0); + + Motor_Move(FPGA1, MOTO_LLOADING_1, MOTO_LLOADING_0); + Motor_HighZ(FPGA1, MOTO_LLOADING_1, MOTO_LLOADING_0); + + Motor_Move(FPGA1, MOTO_LDANCER1_1, MOTO_LDANCER1_0); + Motor_HighZ(FPGA1, MOTO_LDANCER1_1, MOTO_LDANCER1_0); + + Motor_Move(FPGA1, MOTO_LDANCER2_1, MOTO_LDANCER2_0); + Motor_HighZ(FPGA1, MOTO_LDANCER2_1, MOTO_LDANCER2_0); + + Motor_Move(FPGA1, MOTO_LPIVOT1_1, MOTO_LPIVOT1_0); + Motor_HighZ(FPGA1, MOTO_LPIVOT1_1, MOTO_LPIVOT1_0); + + +} + diff --git a/Software/Stubs Collection/stubs/MCU Reset.cs b/Software/Stubs Collection/stubs/MCU Reset.cs new file mode 100644 index 000000000..7af36bc33 --- /dev/null +++ b/Software/Stubs Collection/stubs/MCU Reset.cs @@ -0,0 +1,19 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // Resets the MCU + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000800 | 0x3D0, 0x0); + Thread.Sleep(1000); + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000800 | 0x3D0, 0x1); +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/MarkHome.cs b/Software/Stubs Collection/stubs/MarkHome.cs new file mode 100644 index 000000000..23f59a674 --- /dev/null +++ b/Software/Stubs Collection/stubs/MarkHome.cs @@ -0,0 +1,74 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + // UInt32 : MotorID + // UInt32 : MicroSteps + // Boolean : SetMicroSteps + // UInt32 : ACC + // Boolean : SetACC + // UInt32 : DEC + // Boolean : SetDec + // UInt32 : MaxSpeed + // Boolean : SetMaxSpeed + stubManager.Run("StubMotorInitRequest" ,0, 0, false, 0, false, 0, false, 0, false); // UInt32 : MotorID + + + //Thread.Sleep(1000); +// Request ---- +// UInt32 : MotorID +// UInt32 : SetHomeMarkGOHomeMark + +// Response ---- +// UInt32 : MotorID +// UInt32 : Position +var response5 = stubManager.Run<StubMotorHomeMarkResponse>("StubMotorHomeMarkRequest" ,1, 0);//set home + +var max_speed = 1000; + + // Request ---- +// UInt32 : MotorID +// Boolean : Direction +// UInt32 : Position + stubManager.RequestTimeout=5000; + + for (int i = 0; i < 20; i++) + { + // Response ---- + // UInt32 : MotorID + // UInt32 : Position + // UInt32 : StatusReg + // Boolean : Direction + // UInt32 : MotStatus + // Boolean : STEPLOSSA + // Boolean : STEPLOSSB + var response2 = stubManager.Run<StubMotorMovResponse>("StubMotorMovRequest" ,1, true, 60000); + + stubManager.Run("StubMotorStopRequest" ,111, 1); // 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop + + + + max_speed = max_speed -100; + stubManager.Run("StubMotorInitRequest" ,0, 0, false, 0, false, 0, false, max_speed, true); // UInt32 : MotorID + // Request ---- + // UInt32 : MotorID + // UInt32 : SetHomeMarkGOHomeMark + + // Response ---- + // UInt32 : MotorID + // UInt32 : Position + var response3 = stubManager.Run<StubMotorHomeMarkResponse>("StubMotorHomeMarkRequest" ,1, 2);//go home + } +} + diff --git a/Software/Stubs Collection/stubs/Motor_Get_Param.cs b/Software/Stubs Collection/stubs/Motor_Get_Param.cs new file mode 100644 index 000000000..d3dfdd7ae --- /dev/null +++ b/Software/Stubs Collection/stubs/Motor_Get_Param.cs @@ -0,0 +1,121 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +const Int32 x_ABS_POS = 0x01; +const Int32 x_EL_POS = 0x02; +const Int32 x_MARK = 0x03; +const Int32 x_SPEED = 0x04; +const Int32 x_ACC = 0x05; +const Int32 x_DEC = 0x06; +const Int32 x_MAX_SPEED = 0x07; +const Int32 x_MIN_SPEED = 0x08; +const Int32 x_FS_SPD = 0x15; +const Int32 x_KVAL_HOLD = 0x09; +const Int32 x_KVAL_RUN = 0x0A; +const Int32 x_KVAL_ACC = 0x0B; +const Int32 x_KVAL_DEC = 0x0C; +const Int32 x_INT_SPD = 0x0D; +const Int32 x_ST_SLP = 0x0E; +const Int32 x_FN_SLP_ACC = 0x0F; +const Int32 x_FN_SLP_DEC = 0x10; +const Int32 x_K_THERM = 0x11; +const Int32 x_ADC_OUT = 0x12; +const Int32 x_OCD_TH = 0x13; +const Int32 x_STALL_TH = 0x14; +const Int32 x_STEP_MODE = 0x16; +const Int32 x_ALARM_EN = 0x17; +const Int32 x_CONFIG = 0x18; +const Int32 x_STATUS = 0x19; +//------------------------------- +const Int32 x_GET_PARAM = 0x20; +//------------------------------- +const Int32 Max_Motor_ID = 25; + +Int32 i = 12; + +public void OnExecute(StubManager stubManager) +{ + + + //for (i = 0; i < Max_Motor_ID; i++) + { + stubManager.Write("\nMoTor "); + stubManager.WriteHex(i,2); + + stubManager.Write("\n-------------------------\n"); + var response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_MIN_SPEED)<<16, 0, 0); + stubManager.Write("x_MIN_SPEED : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_MAX_SPEED)<<16, 0, 0); + stubManager.Write("x_MAX_SPEED : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_STEP_MODE)<<8, 0, 0); + stubManager.Write("x_STEP_MODE : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_ACC)<<16, 0, 0); + stubManager.Write("x_ACC : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_DEC)<<16, 0, 0); + stubManager.Write("x_DEC : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_KVAL_HOLD)<<8, 0, 0); + stubManager.Write("x_KVAL_HOLD : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_KVAL_RUN)<<8, 0, 0); + stubManager.Write("x_KVAL_RUN : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_KVAL_ACC)<<8, 0, 0); + stubManager.Write("x_KVAL_ACC : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_KVAL_DEC)<<8, 0, 0); + stubManager.Write("x_KVAL_DEC : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_OCD_TH)<<8, 0, 0); + stubManager.Write("x_OCD_TH : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_STALL_TH)<<8, 0, 0); + stubManager.Write("x_STALL_TH : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_CONFIG)<<16, 0, 0); + stubManager.Write("x_CONFIG : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_FS_SPD)<<16, 0, 0); + stubManager.Write("x_FS_SPD : "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + } + +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/Motor_Get_Param_Horizontal_Printing.cs b/Software/Stubs Collection/stubs/Motor_Get_Param_Horizontal_Printing.cs index 696bb8456..3a01b6a79 100644 --- a/Software/Stubs Collection/stubs/Motor_Get_Param_Horizontal_Printing.cs +++ b/Software/Stubs Collection/stubs/Motor_Get_Param_Horizontal_Printing.cs @@ -54,7 +54,7 @@ public void OnExecute(StubManager stubManager) stubManager.Write("MoTor\tMIN_SPEED\tMAX_SPEED\tSTEP_MODE\tACC\t\tDEC\t\tKVAL_HOLD\tKVAL_RUN\tKVAL_ACC\tKVAL_DEC\tOCD_TH\t\tSTALL_TH\tCONFIG\t\tFS_SPD\n"); stubManager.Write("------\t--------\t--------\t----------\t---\t\t---\t\t---------\t--------\t--------\t--------\t------\t\t--------\t------\t\t------\n"); } - stubManager.Write(i); + stubManager.WriteHex(i,2); stubManager.Write("\t"); var response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_MIN_SPEED)<<16, 0, 0); diff --git a/Software/Stubs Collection/stubs/Motor_read_status.cs b/Software/Stubs Collection/stubs/Motor_read_status.cs new file mode 100644 index 000000000..120007215 --- /dev/null +++ b/Software/Stubs Collection/stubs/Motor_read_status.cs @@ -0,0 +1,53 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +const Int32 x_GET_STATUS = 0xD0; + + +public void OnExecute(StubManager stubManager) +{ + + var response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,12, (x_GET_STATUS)<<16, 0, 0); + stubManager.Write("x_GET_STATUS = "); + stubManager.WriteHex(response.RecivedData,4); + stubManager.Write("\n\n"); + + UInt32 HIZ = response.RecivedData&1; + stubManager.Write("HIZ = "); + stubManager.WriteHex(HIZ,1); + stubManager.Write("\n\n"); + + + + // Request ---- +// UInt32 : MotorID +// Boolean : ClearStatus + +// Response ---- +// UInt32 : MotorID +// Boolean : SCKMOD +// Boolean : STEPLOSSB +// Boolean : STEPLOSSA +// Boolean : OCD +// Boolean : THSD +// Boolean : THWRN +// Boolean : UVLO +// Boolean : WRONGCMD +// Boolean : NOTPERFCMD +// UInt32 : MOTSTATUS +// Boolean : DIR +// Boolean : SWEVN +// Boolean : SWF +// Boolean : BUSY +// Boolean : HiZ +//response = stubManager.Run<StubMotorStatusResponse>("StubMotorStatusRequest" ,12, true); +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/MotorsConfiguration.cs b/Software/Stubs Collection/stubs/MotorsConfiguration.cs new file mode 100644 index 000000000..28fe007c1 --- /dev/null +++ b/Software/Stubs Collection/stubs/MotorsConfiguration.cs @@ -0,0 +1,315 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs; + +HardwareMotor FeederMotor = new HardwareMotor(); +FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving; +FeederMotor.MinFrequency = 0; +FeederMotor.MaxFrequency = 1000000; +FeederMotor.SetMicroStep = 1; +FeederMotor.MicroStep = 8; +FeederMotor.MaxChangeSlope = 4095; +FeederMotor.HighLengthMicroSecond = 0; +FeederMotor.SpeedMaster = false; +FeederMotor.PulsePerRound = 200; +FeederMotor.PulleyRadius = 1.25; +FeederMotor.ConfigWord = 0x1C80; +FeederMotor.DirectionThreadWize = true; +FeederMotor.KvalHold = 0x35; +FeederMotor.KvalRun = 0x7f; +FeederMotor.KvalAcc = 0x7f; +FeederMotor.KvalDec = 0x7f; +FeederMotor.OverCurrentThreshold = 7; +FeederMotor.StallThreshold = 0x1F; +FeederMotor.ThermalCompensationFactor = 0; +FeederMotor.LowSpeedOptimization = false; +FeederMotor.StSlp = 0x20; +FeederMotor.IntSpd = 0x1A13; //6675 +FeederMotor.FnSlpAcc = 0x50; +FeederMotor.FnSlpDec = 0x50; +FeederMotor.FsSpd = 0x27; + +HardwareMotor DryerMotor = new HardwareMotor(); +DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; +DryerMotor.MinFrequency = 0; +DryerMotor.MaxFrequency = 1000000; +DryerMotor.SetMicroStep = 1; +DryerMotor.MicroStep = 8; +DryerMotor.MaxChangeSlope = 4095; +DryerMotor.HighLengthMicroSecond = 0; +DryerMotor.SpeedMaster = true; +DryerMotor.PulsePerRound = 200; +DryerMotor.PulleyRadius = 1.05; +DryerMotor.ConfigWord = 0x1c80; //7296 +DryerMotor.DirectionThreadWize = true; +DryerMotor.KvalHold = 0x35; //53 +DryerMotor.KvalRun = 0x7f; //127 +DryerMotor.KvalAcc = 0x7f; +DryerMotor.KvalDec = 0x7f; +DryerMotor.OverCurrentThreshold = 7; +DryerMotor.StallThreshold = 0x1F; +DryerMotor.ThermalCompensationFactor = 0; +DryerMotor.LowSpeedOptimization = false; +DryerMotor.StSlp = 0x20; +DryerMotor.IntSpd = 0x1A13; +DryerMotor.FnSlpAcc = 0x50; +DryerMotor.FnSlpDec = 0x50; +DryerMotor.FsSpd = 0x27; + +HardwareMotor PoolerMotor = new HardwareMotor(); +PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; +PoolerMotor.MinFrequency = 0; +PoolerMotor.MaxFrequency = 1000000; +PoolerMotor.SetMicroStep = 1; +PoolerMotor.MicroStep = 8; +PoolerMotor.MaxChangeSlope = 10000; +PoolerMotor.HighLengthMicroSecond = 0; +PoolerMotor.SpeedMaster = false; +PoolerMotor.PulsePerRound = 200; +PoolerMotor.PulleyRadius = 1.25; +PoolerMotor.ConfigWord = 0x1C80; +PoolerMotor.DirectionThreadWize = true; +PoolerMotor.KvalHold = 0x35; +PoolerMotor.KvalRun = 0x7f; +PoolerMotor.KvalAcc = 0x7f; +PoolerMotor.KvalDec = 0x7f; +PoolerMotor.OverCurrentThreshold = 7; +PoolerMotor.StallThreshold = 0x1F; +PoolerMotor.ThermalCompensationFactor = 0; +PoolerMotor.LowSpeedOptimization = false; +PoolerMotor.StSlp = 20; +PoolerMotor.IntSpd = 0x1A13; +PoolerMotor.FnSlpAcc = 0x50; +PoolerMotor.FnSlpDec = 0x50; +PoolerMotor.FsSpd = 0x27; + +HardwareMotor WinderMotor = new HardwareMotor(); +WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; +WinderMotor.MinFrequency = 0; +WinderMotor.MaxFrequency = 100000; +WinderMotor.SetMicroStep = 1; +WinderMotor.MicroStep = 16; +WinderMotor.MaxChangeSlope = 4095; +WinderMotor.HighLengthMicroSecond = 0; +WinderMotor.SpeedMaster = false; +WinderMotor.PulsePerRound = 200; +WinderMotor.PulleyRadius = 0.8; +WinderMotor.ConfigWord = 0x1CA0; +WinderMotor.DirectionThreadWize = false; +WinderMotor.KvalHold = 0x08; +WinderMotor.KvalRun = 0x20; +WinderMotor.KvalAcc = 0x20; +WinderMotor.KvalDec = 0x20; +WinderMotor.OverCurrentThreshold = 0xF; +WinderMotor.StallThreshold = 0x7F; +WinderMotor.ThermalCompensationFactor = 0; +WinderMotor.LowSpeedOptimization = false; +WinderMotor.StSlp = 0x7; +WinderMotor.IntSpd = 0x22C5; +WinderMotor.FnSlpAcc = 0x15; +WinderMotor.FnSlpDec = 0x15; +WinderMotor.FsSpd = 0x3ff; + +HardwareMotor ScrewMotor = new HardwareMotor(); +ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; +ScrewMotor.MinFrequency = 0; +ScrewMotor.MaxFrequency = 100000; +ScrewMotor.SetMicroStep = 1; +ScrewMotor.MicroStep = 8; +ScrewMotor.MaxChangeSlope = 4095; +ScrewMotor.HighLengthMicroSecond = 0; +ScrewMotor.SpeedMaster = false; +ScrewMotor.PulsePerRound = 200; +ScrewMotor.PulleyRadius = 1.68; +ScrewMotor.ConfigWord = 0x1CA0; //7328 +ScrewMotor.DirectionThreadWize = true; +ScrewMotor.KvalHold = 0x1; +ScrewMotor.KvalRun = 0x20; +ScrewMotor.KvalAcc = 0x20; +ScrewMotor.KvalDec = 0x20; +ScrewMotor.OverCurrentThreshold = 0xF; +ScrewMotor.StallThreshold = 0x7F; +ScrewMotor.ThermalCompensationFactor = 0; +ScrewMotor.LowSpeedOptimization = false; +ScrewMotor.StSlp = 0x7; +ScrewMotor.IntSpd = 0x22C5; //8901 +ScrewMotor.FnSlpAcc = 0x15; +ScrewMotor.FnSlpDec = 0x15; +ScrewMotor.FsSpd = 0x27; + + +HardwareMotor LeftRockerMotor = new HardwareMotor(); +LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading; +LeftRockerMotor.MinFrequency = 0; +LeftRockerMotor.MaxFrequency = 1000000; +LeftRockerMotor.SetMicroStep = 1; +LeftRockerMotor.MicroStep = 4; +LeftRockerMotor.MaxChangeSlope = 4095; +LeftRockerMotor.HighLengthMicroSecond = 0; +LeftRockerMotor.SpeedMaster = false; +LeftRockerMotor.PulsePerRound = 200; +LeftRockerMotor.PulleyRadius = 1.3; +LeftRockerMotor.ConfigWord = 0xC80; +LeftRockerMotor.DirectionThreadWize = true; +LeftRockerMotor.KvalHold = 0x28; +LeftRockerMotor.KvalRun = 0x5f; +LeftRockerMotor.KvalAcc = 0x5f; +LeftRockerMotor.KvalDec = 0x5f; +LeftRockerMotor.OverCurrentThreshold = 7; +LeftRockerMotor.StallThreshold = 0x1F; +LeftRockerMotor.ThermalCompensationFactor = 0; +LeftRockerMotor.LowSpeedOptimization = false; +LeftRockerMotor.StSlp = 6; +LeftRockerMotor.IntSpd = 0x44B8; +LeftRockerMotor.FnSlpAcc = 0x14; +LeftRockerMotor.FnSlpDec = 0x14; + +HardwareMotor RightRockerMotor = new HardwareMotor(); +RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; +RightRockerMotor.MinFrequency = 0; +RightRockerMotor.MaxFrequency = 1000000; +RightRockerMotor.SetMicroStep = 1; +RightRockerMotor.MicroStep = 4; +RightRockerMotor.MaxChangeSlope = 4095; +RightRockerMotor.HighLengthMicroSecond = 0; +RightRockerMotor.SpeedMaster = false; +RightRockerMotor.PulsePerRound = 200; +RightRockerMotor.PulleyRadius = 1.3; +RightRockerMotor.ConfigWord = 0xC80; +RightRockerMotor.DirectionThreadWize = true; +RightRockerMotor.KvalHold = 0x28; +RightRockerMotor.KvalRun = 0x5f; +RightRockerMotor.KvalAcc = 0x5f; +RightRockerMotor.KvalDec = 0x5f; +RightRockerMotor.OverCurrentThreshold = 7; +RightRockerMotor.StallThreshold = 0x1F; +RightRockerMotor.ThermalCompensationFactor = 0; +RightRockerMotor.LowSpeedOptimization = false; +RightRockerMotor.StSlp = 6; +RightRockerMotor.IntSpd = 0x44B8; +RightRockerMotor.FnSlpAcc = 0x14; +RightRockerMotor.FnSlpDec = 0x14; +RightRockerMotor.FsSpd = 0x27; + +HardwareMotor Dispenser4Motor = new HardwareMotor(); +Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser4; +Dispenser4Motor.MinFrequency = 0; +Dispenser4Motor.MaxFrequency = 100000; +Dispenser4Motor.SetMicroStep = 1; +Dispenser4Motor.MicroStep = 16; +Dispenser4Motor.MaxChangeSlope = 0x7FF; +Dispenser4Motor.HighLengthMicroSecond = 0; +Dispenser4Motor.SpeedMaster = false; +Dispenser4Motor.PulsePerRound = 400; +Dispenser4Motor.PulleyRadius = 1.68; +Dispenser4Motor.ConfigWord = 0x1CA0; +Dispenser4Motor.DirectionThreadWize = true; +Dispenser4Motor.KvalHold = 0x21; +Dispenser4Motor.KvalRun = 0xc0; +Dispenser4Motor.KvalAcc = 0x2e; +Dispenser4Motor.KvalDec = 0x3ff; +Dispenser4Motor.OverCurrentThreshold = 0xF; +Dispenser4Motor.StallThreshold = 0x1F; +Dispenser4Motor.ThermalCompensationFactor = 0; +Dispenser4Motor.LowSpeedOptimization = false; +Dispenser4Motor.StSlp = 0x9; +Dispenser4Motor.IntSpd = 0x1AD2; +Dispenser4Motor.FnSlpAcc = 0x26; +Dispenser4Motor.FnSlpDec = 0x26; +Dispenser4Motor.FsSpd = 0x3ff; + +HardwareMotor Dispenser7Motor = new HardwareMotor(); +Dispenser7Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7; +Dispenser7Motor.MinFrequency = 0; +Dispenser7Motor.MaxFrequency = 100000; +Dispenser7Motor.SetMicroStep = 1; +Dispenser7Motor.MicroStep = 16; // MultiStep[8] = {1,2,4,8,16,32,64,128}; +Dispenser7Motor.MaxChangeSlope = 20; // ACC + DEC +Dispenser7Motor.HighLengthMicroSecond = 0; +Dispenser7Motor.SpeedMaster = false; +Dispenser7Motor.PulsePerRound = 400; +Dispenser7Motor.PulleyRadius = 1.68; +Dispenser7Motor.ConfigWord = 0x1CA0;//0x1CA0 7328 +Dispenser7Motor.DirectionThreadWize = false; +Dispenser7Motor.KvalHold = 0x21; +Dispenser7Motor.KvalRun = 0xff;//0xc0 +Dispenser7Motor.KvalAcc = 0x40; // + KvalDec 0x80 +Dispenser7Motor.KvalDec = 0x080; //x_FS_SPD - 0x3FF (max.) the system always works in microstepping mode +Dispenser7Motor.OverCurrentThreshold = 0xF; +Dispenser7Motor.StallThreshold = 0x7F;//0x40 +Dispenser7Motor.ThermalCompensationFactor = 0; +Dispenser7Motor.LowSpeedOptimization = false; +Dispenser7Motor.StSlp = 0x09;//0x09 +Dispenser7Motor.IntSpd = 0x44B8;//0x1AD2; //44b8=17592 +Dispenser7Motor.FnSlpAcc = 0x26;//0x26 +Dispenser7Motor.FnSlpDec = 0x26; +Dispenser7Motor.FsSpd = 0x3ff; + +HardwareMotor Dispenser8Motor = new HardwareMotor(); +Dispenser8Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser8; +Dispenser8Motor.MinFrequency = 0; +Dispenser8Motor.MaxFrequency = 100000; +Dispenser8Motor.SetMicroStep = 1; +Dispenser8Motor.MicroStep = 16; +Dispenser8Motor.MaxChangeSlope = 0x7FF; +Dispenser8Motor.HighLengthMicroSecond = 0; +Dispenser8Motor.SpeedMaster = false; +Dispenser8Motor.PulsePerRound = 400; +Dispenser8Motor.PulleyRadius = 1.68; +Dispenser8Motor.ConfigWord = 0x1CA0; +Dispenser8Motor.DirectionThreadWize = true; +Dispenser8Motor.KvalHold = 0x21; +Dispenser8Motor.KvalRun = 0xc0; +Dispenser8Motor.KvalAcc = 0x2e; +Dispenser8Motor.KvalDec = 0x3ff; +Dispenser8Motor.OverCurrentThreshold = 0xF; +Dispenser8Motor.StallThreshold = 0x1F; +Dispenser8Motor.ThermalCompensationFactor = 0; +Dispenser8Motor.LowSpeedOptimization = false; +Dispenser8Motor.StSlp = 0x9; +Dispenser8Motor.IntSpd = 0x1AD2; +Dispenser8Motor.FnSlpAcc = 0x26; +Dispenser8Motor.FnSlpDec = 0x26; +Dispenser8Motor.FsSpd = 0x3ff; + +HardwareMotor DryerLoadarm = new HardwareMotor(); +DryerLoadarm.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerLoadarm; +DryerLoadarm.MinFrequency = 0; +DryerLoadarm.MaxFrequency = 1000000; +DryerLoadarm.SetMicroStep = 1; +DryerLoadarm.MicroStep = 1; +DryerLoadarm.MaxChangeSlope = 10000; +DryerLoadarm.HighLengthMicroSecond = 0; +DryerLoadarm.SpeedMaster = false; +DryerLoadarm.PulsePerRound = 200; +DryerLoadarm.PulleyRadius = 1.25; +DryerLoadarm.ConfigWord = 0x1C80; +DryerLoadarm.DirectionThreadWize = false; +DryerLoadarm.KvalHold = 0x35; +DryerLoadarm.KvalRun = 0x7f; +DryerLoadarm.KvalAcc = 0x7f; +DryerLoadarm.KvalDec = 0x27; +DryerLoadarm.OverCurrentThreshold = 7; +DryerLoadarm.StallThreshold = 0x1F; +DryerLoadarm.ThermalCompensationFactor = 0; +DryerLoadarm.LowSpeedOptimization = false; +DryerLoadarm.StSlp = 0x20; +DryerLoadarm.IntSpd = 0x1A13; +DryerLoadarm.FnSlpAcc = 0x50; +DryerLoadarm.FnSlpDec = 0x50; +DryerLoadarm.FsSpd = 0x27; + +HardwareWinder Winder = new HardwareWinder(); +Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; +Winder.MillimeterPerRotation = 20; + diff --git a/Software/Stubs Collection/stubs/New Text Document (2).txt b/Software/Stubs Collection/stubs/New Text Document (2).txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/Software/Stubs Collection/stubs/New Text Document (2).txt diff --git a/Software/Stubs Collection/stubs/New Text Document.txt b/Software/Stubs Collection/stubs/New Text Document.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/Software/Stubs Collection/stubs/New Text Document.txt diff --git a/Software/Stubs Collection/stubs/PT100.cs b/Software/Stubs Collection/stubs/PT100.cs index a1bb51131..647e09869 100644 --- a/Software/Stubs Collection/stubs/PT100.cs +++ b/Software/Stubs Collection/stubs/PT100.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Tango.PMR.Stubs; -using Tango.Stubs.UI; +using Tango.Stubs; public void OnExecute(StubManager stubManager) { diff --git a/Software/Stubs Collection/stubs/PT100__Horizontal_Printing.cs b/Software/Stubs Collection/stubs/PT100__Horizontal_Printing.cs new file mode 100644 index 000000000..18695eabf --- /dev/null +++ b/Software/Stubs Collection/stubs/PT100__Horizontal_Printing.cs @@ -0,0 +1,60 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +//using Tango.Stubs.UI; +using Tango.Stubs;// +using Tango.PMR.Printing; +using Tango.PMR.Hardware; + + +public void OnExecute(StubManager stubManager) +{ + ProcessParameters processParameters = new ProcessParameters(); + processParameters.DyeingSpeed = 0; + processParameters.DryerBufferLength = 0; + processParameters.MinInkUptake = 0; + processParameters.DryerZone1Temp = 0; + processParameters.DryerZone2Temp = 0; + processParameters.DryerZone3Temp = 0; + processParameters.HeadZone1Temp = 70; + processParameters.HeadZone2Temp = 0; + processParameters.HeadZone3Temp = 0; + processParameters.HeadZone4Temp = 0; + processParameters.HeadZone5Temp = 60; + processParameters.HeadZone6Temp = 0; + + UploadProcessParametersRequest uploadProcessParametersRequest = new UploadProcessParametersRequest(); + + uploadProcessParametersRequest.ProcessParameters = processParameters; + var response1 = stubManager.Run<UploadProcessParametersResponse>(uploadProcessParametersRequest); + + for (int j = 0; j < 1000; j++) + { + if((j%10 ==0) ) + { + stubManager.Write("\n"); + stubManager.Write("DYEINGH_6\tDYEINGH_1\tDYEINGH_2\tDYEINGH_3\tDYEINGH_4\tDYEINGH_5\tDRYER_1 \tDRYER_2 \tDRYER_3 \tENCLOSURE_1\tENCLOSURE_2\tENCLOSURE_3\n"); + stubManager.Write("------- \t---------\t---------\t---------\t---------\t---------\t------- \t------- \t------- \t-----------\t-----------\t-----------\n"); + } + for (int i = 0; i < 6; i++)//12 + { + + var response = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,i); // + float ftemp = (float)response.TemperatureCMultBy100; + ftemp = ftemp / 100; + + stubManager.Write(ftemp.ToString("F2")); + stubManager.Write("°C \t"); + + } + stubManager.Write("\n"); + Thread.Sleep(1000); + } +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/Power Down.cs b/Software/Stubs Collection/stubs/Power Down.cs new file mode 100644 index 000000000..5b4cf5758 --- /dev/null +++ b/Software/Stubs Collection/stubs/Power Down.cs @@ -0,0 +1,16 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, 0x0800); // PDOWN_RL1_CTRL +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/READ_GPIO_A_PIN_7_High_Speed.cs b/Software/Stubs Collection/stubs/READ_GPIO_A_PIN_7_High_Speed.cs new file mode 100644 index 000000000..ee3dec3c8 --- /dev/null +++ b/Software/Stubs Collection/stubs/READ_GPIO_A_PIN_7_High_Speed.cs @@ -0,0 +1,21 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + stubManager.Run("StubGPIOInputSetupRequest" ,"A", 7, 1, 1); // Set PS3 to input with Pull up + for (int i = 0; i < 50; i++) + { + stubManager.Run("StubGPIOReadBitRequest" ,"A", 7, false, false);//Read pin 3 + Thread.Sleep(1000); + } +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/READ_GPIO_PA7_High_Speed_Polling.cs b/Software/Stubs Collection/stubs/READ_GPIO_PA7_High_Speed_Polling.cs new file mode 100644 index 000000000..34f729498 --- /dev/null +++ b/Software/Stubs Collection/stubs/READ_GPIO_PA7_High_Speed_Polling.cs @@ -0,0 +1,21 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + stubManager.Run("StubGPIOInputSetupRequest" ,"A", 7, 1, 1); // Set PS3 to input with Pull up + for (int i = 0; i < 5; i++) + { + stubManager.Run("StubGPIOReadBitRequest" ,"A", 7, true, true);//Read pin 3 (Polling, timeout 2 SEC for every request) + Thread.Sleep(1000); + } +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/READ_GPIO_S_PIN_3.cs b/Software/Stubs Collection/stubs/READ_GPIO_S_PIN_3.cs new file mode 100644 index 000000000..2955e73c0 --- /dev/null +++ b/Software/Stubs Collection/stubs/READ_GPIO_S_PIN_3.cs @@ -0,0 +1,21 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + stubManager.Run("StubGPIOInputSetupRequest" ,"S", 3, 1, 1); // Set PS3 to input with Pull up + for (int i = 0; i < 50; i++) + { + stubManager.Run("StubGPIOReadBitRequest" ,"S", 3, false, false);//Read pin 3 + Thread.Sleep(1000); + } +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/READ_PT100.cs b/Software/Stubs Collection/stubs/READ_PT100.cs new file mode 100644 index 000000000..ffd40ca30 --- /dev/null +++ b/Software/Stubs Collection/stubs/READ_PT100.cs @@ -0,0 +1,33 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + for (int i = 0; i < 1; i++) + { + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,0); // + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,1); // + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,2); // + + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,3); // + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,4); // + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,5); + + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,6); //TEMP_SENSE_ANALOG_DRYER_TEMP1 + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,7); //TEMP_SENSE_ANALOG_DRYER_TEMP2 + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,8); //TEMP_SENSE_ANALOG_DRYER_TEMP3 + + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,9); // + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,10); // + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,11); // + } +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/Read PT100.cs b/Software/Stubs Collection/stubs/Read PT100.cs new file mode 100644 index 000000000..6eccaf229 --- /dev/null +++ b/Software/Stubs Collection/stubs/Read PT100.cs @@ -0,0 +1,99 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // Request ---- + // UInt32 : Address + // UInt32 : Value + + // Response ---- + // String : Status + // UInt32 : StatusWord + + //stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, 0xFFFF); // turn ON all the heaters + +/* + int Zone = 4; + const Int32 SSR = 5; + const Int32 SSR_REG = 0x40; + int PT100 = 4; + +*/ +//---------------------------------- +///* + int Zone = 3; + const Int32 SSR = 6; + const Int32 SSR_REG = 0x20; + const Int32 PT100 = 3; + +//*/ +//---------------------------------- +/* + int Zone = 2; + const Int32 SSR = 7; + const Int32 SSR_REG = 0x10; + const Int32 PT100 = 2; + +*/ +//------------------------------------- +/* + int Zone = 1; + const Int32 SSR = 8; + const Int32 SSR_REG = 0x08; + const Int32 PT100 = 1; + +*/ +//------------------------------------- + + + + + + + //stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, SSR_REG); // turn ON the heater + + + + for (int i = 0; i < 15; i++) + { + //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,1); //measer the teperature + //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,2); //measer the teperature + //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,3); //measer the teperature + //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,4); //measer the teperature + //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,5); //measer the teperature + + // Request ---- + // UInt32 : STempSensorID + + // Response ---- + // UInt32 : TempSensorID + // UInt32 : TemperatureCMultBy100 + var response = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,PT100); //measer the teperature + stubManager.Write(response.TemperatureCMultBy100); + stubManager.Write("\n\n"); + Thread.Sleep(1500); + //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,PT100_1); //measer the teperature + //Thread.Sleep(1500); + + } + + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, 0x0000); // turn OFF all the heaters + /* + for (int i = 0; i < 100; i++) + { + stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,PT100);//measer the teperature + Thread.Sleep(1500); + + } + */ +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/Read dancer Position.cs b/Software/Stubs Collection/stubs/Read dancer Position.cs new file mode 100644 index 000000000..7e38f4059 --- /dev/null +++ b/Software/Stubs Collection/stubs/Read dancer Position.cs @@ -0,0 +1,28 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // Request ---- + // UInt32 : DancerID + + // Response ---- + // UInt32 : DancerID + // UInt32 : Position + // UInt32 : GeneralStatus + // UInt32 : DetailedStatus + var response = stubManager.Run<StubDancerPositionResponse>("StubDancerPositionRequest" ,0); // Left 1 - pooler -0, Left 2 winder - 1, Right feeder - 3, 4 speed sensor + stubManager.WriteLineHex(response.Position,4); //14 Bit + stubManager.WriteLineHex(response.GeneralStatus,1); //2 Bit + stubManager.WriteLineHex(response.DetailedStatus,1); //8 Bit +} + diff --git a/Software/Stubs Collection/stubs/Read_Output_GPIO_Byte.cs b/Software/Stubs Collection/stubs/Read_Output_GPIO_Byte.cs new file mode 100644 index 000000000..891733a90 --- /dev/null +++ b/Software/Stubs Collection/stubs/Read_Output_GPIO_Byte.cs @@ -0,0 +1,33 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubGPIOReadByteRequest" ,"Q"); // read port Q + Thread.Sleep(10); + stubManager.Run("StubGPIOWriteByteRequest" ,"Q", 0); //reset port Q + Thread.Sleep(10); + stubManager.Run("StubGPIOReadByteRequest" ,"Q"); // read port Q + Thread.Sleep(10); + stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, true); // set pin 7 + Thread.Sleep(10); + stubManager.Run("StubGPIOReadByteRequest" ,"Q"); // read port Q + Thread.Sleep(10); + stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true); // set pin 4 + Thread.Sleep(10); + stubManager.Run("StubGPIOReadByteRequest" ,"Q"); // read port Q + Thread.Sleep(10); + stubManager.Run("StubGPIOWriteByteRequest" ,"Q", 0); //reset port Q + Thread.Sleep(10); + stubManager.Run("StubGPIOReadByteRequest" ,"Q"); // read port Q + Thread.Sleep(10); +} + diff --git a/Software/Stubs Collection/stubs/Read_Speed_Sensor.cs b/Software/Stubs Collection/stubs/Read_Speed_Sensor.cs new file mode 100644 index 000000000..207a25740 --- /dev/null +++ b/Software/Stubs Collection/stubs/Read_Speed_Sensor.cs @@ -0,0 +1,23 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + for (int i = 0; i < 100; i++) + { + // Request ---- + + // Response ---- + // UInt32 : Speed + var response = stubManager.Run<StubSpeedSensorResponse>("StubSpeedSensorRequest"); + } +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/Read_bit_from_output_GPIO.cs b/Software/Stubs Collection/stubs/Read_bit_from_output_GPIO.cs new file mode 100644 index 000000000..81b47b547 --- /dev/null +++ b/Software/Stubs Collection/stubs/Read_bit_from_output_GPIO.cs @@ -0,0 +1,25 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, true); // set pin 7 + Thread.Sleep(10); + stubManager.Run("StubGPIOReadBitRequest" ,"Q", 4, false, false);//Read pin 4 + Thread.Sleep(10); + stubManager.Run("StubGPIOReadBitRequest" ,"Q", 7, false, false);//Read pin 7 + Thread.Sleep(10); + stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false); // reset pin 7 + Thread.Sleep(10); + stubManager.Run("StubGPIOReadBitRequest" ,"Q", 7, false, false);//Read pin 7 again + Thread.Sleep(10); +} + diff --git a/Software/Stubs Collection/stubs/SW_Reset.cs b/Software/Stubs Collection/stubs/SW_Reset.cs new file mode 100644 index 000000000..e7b3b7499 --- /dev/null +++ b/Software/Stubs Collection/stubs/SW_Reset.cs @@ -0,0 +1,19 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs; + +public void OnExecute(StubManager stubManager) +{ + // Resets the MCU - F3_SW_RESETN + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000800 | 0x3D0, 0x0); + Thread.Sleep(1000); + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000800 | 0x3D0, 0x1); +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/ScrewMotorMov.cs b/Software/Stubs Collection/stubs/ScrewMotorMov.cs index 6b3ffe626..1c1f94514 100644 --- a/Software/Stubs Collection/stubs/ScrewMotorMov.cs +++ b/Software/Stubs Collection/stubs/ScrewMotorMov.cs @@ -8,39 +8,17 @@ using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Tango.PMR.Stubs; -using Tango.Stubs; +using Tango.Stubs.UI; public void OnExecute(StubManager stubManager) { // FALSE - to the body //TRUE out - // Request ---- -// UInt32 : ValveId -// UInt32 : Inkflow -// Boolean : ValveOn -// Request ---- -// UInt32 : ADCDevice - -// Response ---- -// UInt32 : ADCDevice -// Int32 : SamplingInBits -// Int32 : VoltageSamplingMv -// String : Status -// UInt32 : StatusWord -//var response = stubManager.Run<StubIntADCReadResponse>("StubIntADCReadRequest" ,UInt32); - -// Response ---- -// String : Status -// UInt32 : StatusWord - //open valve toward the mixer, run dispenser 7 - //var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, true); - //var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,3, true, 800); - //Thread.Sleep(3000); - //open valve toward the midtank, stop dispenser 7 - //var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, false); - var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,3,0); - //Thread.Sleep(10); - //var response1 = stubManager.Run<StubMotorMovResponse>("StubMotorMovRequest" ,12, false, 150); + var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,14, true, 20); + Thread.Sleep(100); + var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,14,2); + Thread.Sleep(10); + var response1 = stubManager.Run<StubMotorMovResponse>("StubMotorMovRequest" ,14, false, 150); // Request ---- // UInt32 : Address diff --git a/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes.cs b/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes.cs index 8944bdb5f..553d4ede6 100644 --- a/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes.cs +++ b/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes.cs @@ -64,11 +64,8 @@ hardwareConfiguration.Motors.Add(WinderMotor); hardwareConfiguration.Motors.Add(DryerMotor); hardwareConfiguration.Motors.Add(PoolerMotor); hardwareConfiguration.Motors.Add(ScrewMotor); -//hardwareConfiguration.Motors.Add(LeftRockerMotor); -//hardwareConfiguration.Motors.Add(RightRockerMotor); -hardwareConfiguration.Motors.Add(Dispenser4Motor); - -//hardwareConfiguration.Dispensers.Add(hardwareDispenser); +hardwareConfiguration.Motors.Add(LeftRockerMotor); +hardwareConfiguration.Motors.Add(RightRockerMotor); hardwareConfiguration.PidControls.Add(FeederPidControl); hardwareConfiguration.PidControls.Add(PoolerPidControl); @@ -80,8 +77,6 @@ hardwareConfiguration.Dancers.Add(WinderDancer); hardwareConfiguration.Winders.Add(Winder); - - stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize()); diff --git a/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes1.cs b/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes1.cs new file mode 100644 index 000000000..4a204a617 --- /dev/null +++ b/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes1.cs @@ -0,0 +1,87 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +include "C:\Twine Code\stubs\addedfiles\ACHeatersDefinition.cs" +include "C:\Twine Code\stubs\addedfiles\DCHeatersDefinition.cs" +include "C:\Twine Code\stubs\addedfiles\ThreadMotorsDefinition.cs" +//include "C:\Twine Code\stubs\addedfiles\DeskSystemThreadMotorsDefinition.cs" + +public void OnExecute(StubManager stubManager) +{ + Thread.Sleep(10); + +/*ProcessParameters processParameters = new ProcessParameters(); +processParameters.DyeingSpeed = 10; +processParameters.MixerTemp = 0; +processParameters.DryerBufferLength = 0; +processParameters.MinInkUptake = 0; +processParameters.HeadZone1Temp = 0; +processParameters.DryerZone1Temp = 100; +processParameters.FeederTension = 0; +processParameters.DryerZone2Temp = 100; +processParameters.HeadZone2Temp = 0; +processParameters.PullerTension = 0; +processParameters.HeadZone3Temp = 0; +processParameters.DryerZone3Temp = 0; +processParameters.WinderTension = 0; +processParameters.HeadAirFlow = 0; +processParameters.DryerAirFlow = 0; +processParameters.TableIndex = 0; + +uploadProcessParametersRequest.ProcessParameters = processParameters; +var response1 = stubManager.Run<UploadProcessParametersResponse>(uploadProcessParametersRequest); +*/ + +UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest(); + +HardwareConfiguration hardwareConfiguration = new HardwareConfiguration(); + +//hardwareConfiguration.PidControls.Add(HeadZ1Heater); +//hardwareConfiguration.PidControls.Add(HeadZ2Heater); +//hardwareConfiguration.PidControls.Add(HeadZ3Heater); +//hardwareConfiguration.PidControls.Add(HeadZ4Heater); +//hardwareConfiguration.PidControls.Add(MixerHeater); + +//hardwareConfiguration.PidControls.Add(DryerHeater1000); +//hardwareConfiguration.PidControls.Add(DryerHeater200w1); + + +hardwareConfiguration.Motors.Add(FeederMotor); +hardwareConfiguration.Motors.Add(WinderMotor); +hardwareConfiguration.Motors.Add(DryerMotor); +hardwareConfiguration.Motors.Add(PoolerMotor); +hardwareConfiguration.Motors.Add(ScrewMotor); +hardwareConfiguration.Motors.Add(LeftRockerMotor); +hardwareConfiguration.Motors.Add(RightRockerMotor); + +hardwareConfiguration.PidControls.Add(FeederPidControl); +hardwareConfiguration.PidControls.Add(PoolerPidControl); +hardwareConfiguration.PidControls.Add(WinderPidControl); + +hardwareConfiguration.Dancers.Add(FeederDancer); +hardwareConfiguration.Dancers.Add(PoolerDancer); +hardwareConfiguration.Dancers.Add(WinderDancer); + +hardwareConfiguration.Winders.Add(Winder); + +stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize()); + + +uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration; +var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest); + /*Thread.Sleep(5000);*/ + + +} + diff --git a/Software/Stubs Collection/stubs/TestDispenser7.cs b/Software/Stubs Collection/stubs/TestDispenser7.cs index 892e74385..58339e708 100644 --- a/Software/Stubs Collection/stubs/TestDispenser7.cs +++ b/Software/Stubs Collection/stubs/TestDispenser7.cs @@ -10,7 +10,7 @@ using System.Collections.Generic; using Tango.PMR.Hardware; using Tango.PMR.Printing; using Tango.PMR.Stubs; -using Tango.Stubs.UI; +using Tango.Stubs; public void OnExecute(StubManager stubManager) @@ -18,17 +18,17 @@ public void OnExecute(StubManager stubManager) Thread.Sleep(10); HardwareMotor Dispenser7Motor = new HardwareMotor(); Dispenser7Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7; -Dispenser7Motor.MinFrequency = 0; +/*Dispenser7Motor.MinFrequency = 0; Dispenser7Motor.MaxFrequency = 100000; Dispenser7Motor.SetMicroStep = 1; -Dispenser7Motor.MicroStep = 16; +Dispenser7Motor.MicroStep = 64;*/ Dispenser7Motor.MaxChangeSlope = 0x7ff; -Dispenser7Motor.HighLengthMicroSecond = 0; +/*Dispenser7Motor.HighLengthMicroSecond = 0; Dispenser7Motor.SpeedMaster = false; Dispenser7Motor.PulsePerRound = 200; Dispenser7Motor.PulleyRadius = 0.8; Dispenser7Motor.ConfigWord = 0x1CA0; -Dispenser7Motor.DirectionThreadWize = false; +Dispenser7Motor.DirectionThreadWize = true; Dispenser7Motor.KvalHold = 0x08; Dispenser7Motor.KvalRun = 0x20; Dispenser7Motor.KvalAcc = 0x20; @@ -42,7 +42,7 @@ Dispenser7Motor.IntSpd = 0x22C5; Dispenser7Motor.FnSlpAcc = 0x15; Dispenser7Motor.FnSlpDec = 0x15; Dispenser7Motor.FsSpd = 0x3ff; - +*/ UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest(); @@ -53,15 +53,16 @@ hardwareConfiguration.Motors.Add(Dispenser7Motor); stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize()); -uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration; +//uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration; var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest); - /*Thread.Sleep(5000);*/ -var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, false); -var response4 = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,12, false, 1200); -Thread.Sleep(1000); +var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,12,2); + Thread.Sleep(500); +var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, true); +var response4 = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,12, false, 4000); +//Thread.Sleep(10000); //open valve toward the midtank, stop dispenser 7 -//var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, false); -//var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,12,2); +//var response5 = stubManager.Run<StubValveResponse>("StubValveRequest" ,7, 10, false); +//var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,13,2); diff --git a/Software/Stubs Collection/stubs/Write_Byte_to_Port_Q.cs b/Software/Stubs Collection/stubs/Write_Byte_to_Port_Q.cs new file mode 100644 index 000000000..1bfb91d2e --- /dev/null +++ b/Software/Stubs Collection/stubs/Write_Byte_to_Port_Q.cs @@ -0,0 +1,28 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubGPIOWriteByteRequest" ,"Q", 0); // turn the byte OFF + + for (int i = 0; i < 100; i++) + { + + stubManager.Run("StubGPIOWriteByteRequest" ,"Q", 0x10);// BLUE + Thread.Sleep(1000); + stubManager.Run("StubGPIOWriteByteRequest" ,"Q", 0x90);//BLUE and GREEN + Thread.Sleep(1000); + stubManager.Run("StubGPIOWriteByteRequest" ,"Q", 0x80); //GREEN + Thread.Sleep(1000); + } +} + + diff --git a/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs index f815c1cd4..48a198869 100644 --- a/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs +++ b/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs @@ -14,15 +14,17 @@ using Tango.Stubs; HardwarePidControl DryerHeater1000 = new HardwarePidControl(); DryerHeater1000.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater1000W; -DryerHeater1000.OutputProportionalBand = 1; +DryerHeater1000.OutputProportionalPowerLimit = 50; +DryerHeater1000.OutputProportionalBand = 3; DryerHeater1000.SensorCorrectionAdjustment = 2.0; DryerHeater1000.IntegralTime = 0.01; -DryerHeater1000.OutputProportionalPowerLimit = 100; +DryerHeater1000.OutputProportionalPowerLimit = 80; +DryerHeater1000.OutputProportionalBand = 5; DryerHeater1000.IntegralTime = 5; DryerHeater1000.DerivativeTime = 0; DryerHeater1000.SensorCorrectionAdjustment = 0; DryerHeater1000.SensorMinValue = 2; -DryerHeater1000.SensorMaxValue = 250; +DryerHeater1000.SensorMaxValue = 200; DryerHeater1000.SetPointRampRateorSoftStartRamp = 0; DryerHeater1000.SetPointControlOutputRate = 4; DryerHeater1000.ControlOutputType = 0; @@ -32,15 +34,15 @@ DryerHeater1000.ProcessVariableSamplingRate = 1000; DryerHeater1000.PvInputFilterFactorMode = 4; DryerHeater1000.OutputProportionalCycleTime = 0; DryerHeater1000.AcHeatersHalfCycleTime = 0; -DryerHeater1000.ProportionalGain = 20.0; +DryerHeater1000.ProportionalGain = 500.0; HardwarePidControl DryerHeater200w1 = new HardwarePidControl(); DryerHeater200w1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater200W1; DryerHeater200w1.OutputProportionalPowerLimit = 0;//small heater is OFF after initial heating -DryerHeater200w1.OutputProportionalBand = 1; +DryerHeater200w1.OutputProportionalBand = 3; DryerHeater200w1.SensorCorrectionAdjustment = 0.5; DryerHeater200w1.IntegralTime = 0.1; -DryerHeater200w1.OutputProportionalPowerLimit = 0; +DryerHeater200w1.OutputProportionalPowerLimit = 80; DryerHeater200w1.OutputProportionalBand = 5; DryerHeater200w1.IntegralTime = 5; DryerHeater200w1.DerivativeTime = 0; @@ -56,7 +58,7 @@ DryerHeater200w1.ProcessVariableSamplingRate = 1000; DryerHeater200w1.PvInputFilterFactorMode = 4; DryerHeater200w1.OutputProportionalCycleTime = 0; DryerHeater200w1.AcHeatersHalfCycleTime = 0; -DryerHeater200w1.ProportionalGain = 20.0; +DryerHeater200w1.ProportionalGain = 500.0; //hardwareConfiguration.PidControls.Add(DryerHeater1000); //hardwareConfiguration.PidControls.Add(DryerHeater200w1); diff --git a/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs index 015dc7be6..f007f8225 100644 --- a/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs +++ b/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs @@ -14,15 +14,17 @@ using Tango.Stubs; HardwarePidControl HeadZ1Heater = new HardwarePidControl(); HeadZ1Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ1; -HeadZ1Heater.OutputProportionalBand = 1; +HeadZ1Heater.OutputProportionalPowerLimit = 50; +HeadZ1Heater.OutputProportionalBand = 3; HeadZ1Heater.SensorCorrectionAdjustment = 2.0; HeadZ1Heater.IntegralTime = 0.01; HeadZ1Heater.OutputProportionalPowerLimit = 80; +HeadZ1Heater.OutputProportionalBand = 5; HeadZ1Heater.IntegralTime = 5; HeadZ1Heater.DerivativeTime = 0; HeadZ1Heater.SensorCorrectionAdjustment = 0; HeadZ1Heater.SensorMinValue = 0; -HeadZ1Heater.SensorMaxValue = 1.0; +HeadZ1Heater.SensorMaxValue = 0; HeadZ1Heater.SetPointRampRateorSoftStartRamp = 0; HeadZ1Heater.SetPointControlOutputRate = 4; HeadZ1Heater.ControlOutputType = 0; @@ -32,20 +34,22 @@ HeadZ1Heater.ProcessVariableSamplingRate = 1000; HeadZ1Heater.PvInputFilterFactorMode = 4; HeadZ1Heater.OutputProportionalCycleTime = 0; HeadZ1Heater.AcHeatersHalfCycleTime = 0; -HeadZ1Heater.ProportionalGain = 20; +HeadZ1Heater.ProportionalGain = 500.0; HardwarePidControl HeadZ2Heater = new HardwarePidControl(); HeadZ2Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ2; -HeadZ2Heater.OutputProportionalBand = 1; +HeadZ2Heater.OutputProportionalPowerLimit = 40; +HeadZ2Heater.OutputProportionalBand = 3; HeadZ2Heater.SensorCorrectionAdjustment = 0.5; HeadZ2Heater.IntegralTime = 0.1; HeadZ2Heater.OutputProportionalPowerLimit = 80; +HeadZ2Heater.OutputProportionalBand = 5; HeadZ2Heater.IntegralTime = 5; HeadZ2Heater.DerivativeTime = 0; HeadZ2Heater.SensorCorrectionAdjustment = 0; -HeadZ2Heater.SensorMinValue = 0.0; -HeadZ2Heater.SensorMaxValue = 1.0; +HeadZ2Heater.SensorMinValue = 0; +HeadZ2Heater.SensorMaxValue = 0; HeadZ2Heater.SetPointRampRateorSoftStartRamp = 0; HeadZ2Heater.SetPointControlOutputRate = 4; HeadZ2Heater.ControlOutputType = 0; @@ -55,19 +59,21 @@ HeadZ2Heater.ProcessVariableSamplingRate = 1000; HeadZ2Heater.PvInputFilterFactorMode = 4; HeadZ2Heater.OutputProportionalCycleTime = 0; HeadZ2Heater.AcHeatersHalfCycleTime = 0; -HeadZ2Heater.ProportionalGain = 20; +HeadZ2Heater.ProportionalGain = 500.0; HardwarePidControl HeadZ3Heater = new HardwarePidControl(); HeadZ3Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ3; -HeadZ3Heater.OutputProportionalBand = 1; +HeadZ3Heater.OutputProportionalPowerLimit = 50; +HeadZ3Heater.OutputProportionalBand = 3; HeadZ3Heater.SensorCorrectionAdjustment = 2.0; HeadZ3Heater.IntegralTime = 0.01; HeadZ3Heater.OutputProportionalPowerLimit = 80; +HeadZ3Heater.OutputProportionalBand = 5; HeadZ3Heater.IntegralTime = 5; HeadZ3Heater.DerivativeTime = 0; HeadZ3Heater.SensorCorrectionAdjustment = 0; HeadZ3Heater.SensorMinValue = 0; -HeadZ3Heater.SensorMaxValue = 1.0; +HeadZ3Heater.SensorMaxValue = 0; HeadZ3Heater.SetPointRampRateorSoftStartRamp = 0; HeadZ3Heater.SetPointControlOutputRate = 4; HeadZ3Heater.ControlOutputType = 0; @@ -77,19 +83,21 @@ HeadZ3Heater.ProcessVariableSamplingRate = 1000; HeadZ3Heater.PvInputFilterFactorMode = 4; HeadZ3Heater.OutputProportionalCycleTime = 0; HeadZ3Heater.AcHeatersHalfCycleTime = 0; -HeadZ3Heater.ProportionalGain = 20; +HeadZ3Heater.ProportionalGain = 500.0; HardwarePidControl HeadZ4Heater = new HardwarePidControl(); HeadZ4Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ4; -HeadZ4Heater.OutputProportionalBand = 2; +HeadZ4Heater.OutputProportionalPowerLimit = 40; +HeadZ4Heater.OutputProportionalBand = 3; HeadZ4Heater.SensorCorrectionAdjustment = 0.5; HeadZ4Heater.IntegralTime = 0.1; HeadZ4Heater.OutputProportionalPowerLimit = 80; +HeadZ4Heater.OutputProportionalBand = 5; HeadZ4Heater.IntegralTime = 5; HeadZ4Heater.DerivativeTime = 0; HeadZ4Heater.SensorCorrectionAdjustment = 0; HeadZ4Heater.SensorMinValue = 0; -HeadZ4Heater.SensorMaxValue = 1.0; +HeadZ4Heater.SensorMaxValue = 0; HeadZ4Heater.SetPointRampRateorSoftStartRamp = 0; HeadZ4Heater.SetPointControlOutputRate = 4; HeadZ4Heater.ControlOutputType = 0; @@ -99,19 +107,69 @@ HeadZ4Heater.ProcessVariableSamplingRate = 1000; HeadZ4Heater.PvInputFilterFactorMode = 4; HeadZ4Heater.OutputProportionalCycleTime = 0; HeadZ4Heater.AcHeatersHalfCycleTime = 0; -HeadZ4Heater.ProportionalGain = 20; +HeadZ4Heater.ProportionalGain = 500.0; + +HardwarePidControl HeadZ5Heater = new HardwarePidControl(); +HeadZ5Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ5; +HeadZ5Heater.OutputProportionalPowerLimit = 40; +HeadZ5Heater.OutputProportionalBand = 3; +HeadZ5Heater.SensorCorrectionAdjustment = 0.5; +HeadZ5Heater.IntegralTime = 0.1; +HeadZ5Heater.OutputProportionalPowerLimit = 80; +HeadZ5Heater.OutputProportionalBand = 5; +HeadZ5Heater.IntegralTime = 5; +HeadZ5Heater.DerivativeTime = 0; +HeadZ5Heater.SensorCorrectionAdjustment = 0; +HeadZ5Heater.SensorMinValue = 0; +HeadZ5Heater.SensorMaxValue = 0; +HeadZ5Heater.SetPointRampRateorSoftStartRamp = 0; +HeadZ5Heater.SetPointControlOutputRate = 4; +HeadZ5Heater.ControlOutputType = 0; +HeadZ5Heater.SsrControlOutputType = 0; +HeadZ5Heater.OutputOnOffHysteresisValue = 0; +HeadZ5Heater.ProcessVariableSamplingRate = 1000; +HeadZ5Heater.PvInputFilterFactorMode = 4; +HeadZ5Heater.OutputProportionalCycleTime = 0; +HeadZ5Heater.AcHeatersHalfCycleTime = 0; +HeadZ5Heater.ProportionalGain = 500.0; + +HardwarePidControl HeadZ6Heater = new HardwarePidControl(); +HeadZ6Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ6; +HeadZ6Heater.OutputProportionalPowerLimit = 40; +HeadZ6Heater.OutputProportionalBand = 3; +HeadZ6Heater.SensorCorrectionAdjustment = 0.5; +HeadZ6Heater.IntegralTime = 0.1; +HeadZ6Heater.OutputProportionalPowerLimit = 80; +HeadZ6Heater.OutputProportionalBand = 5; +HeadZ6Heater.IntegralTime = 5; +HeadZ6Heater.DerivativeTime = 0; +HeadZ6Heater.SensorCorrectionAdjustment = 0; +HeadZ6Heater.SensorMinValue = 0; +HeadZ6Heater.SensorMaxValue = 0; +HeadZ6Heater.SetPointRampRateorSoftStartRamp = 0; +HeadZ6Heater.SetPointControlOutputRate = 4; +HeadZ6Heater.ControlOutputType = 0; +HeadZ6Heater.SsrControlOutputType = 0; +HeadZ6Heater.OutputOnOffHysteresisValue = 0; +HeadZ6Heater.ProcessVariableSamplingRate = 1000; +HeadZ6Heater.PvInputFilterFactorMode = 4; +HeadZ6Heater.OutputProportionalCycleTime = 0; +HeadZ6Heater.AcHeatersHalfCycleTime = 0; +HeadZ6Heater.ProportionalGain = 500.0; HardwarePidControl MixerHeater = new HardwarePidControl(); MixerHeater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MixerHeater; -MixerHeater.OutputProportionalBand = 2; +MixerHeater.OutputProportionalPowerLimit = 50; +MixerHeater.OutputProportionalBand = 3; MixerHeater.SensorCorrectionAdjustment = 2.0; MixerHeater.IntegralTime = 0.01; HeadZ4Heater.OutputProportionalPowerLimit = 80; +HeadZ4Heater.OutputProportionalBand = 5; HeadZ4Heater.IntegralTime = 5; HeadZ4Heater.DerivativeTime = 0; HeadZ4Heater.SensorCorrectionAdjustment = 0; HeadZ4Heater.SensorMinValue = 0; -HeadZ4Heater.SensorMaxValue = 1.0; +HeadZ4Heater.SensorMaxValue = 0; HeadZ4Heater.SetPointRampRateorSoftStartRamp = 0; HeadZ4Heater.SetPointControlOutputRate = 4; HeadZ4Heater.ControlOutputType = 0; @@ -121,7 +179,7 @@ HeadZ4Heater.ProcessVariableSamplingRate = 1000; HeadZ4Heater.PvInputFilterFactorMode = 4; HeadZ4Heater.OutputProportionalCycleTime = 0; HeadZ4Heater.AcHeatersHalfCycleTime = 0; -HeadZ4Heater.ProportionalGain = 20; +HeadZ4Heater.ProportionalGain = 500.0; //hardwareConfiguration.PidControls.Add(HeadZ1Heater); diff --git a/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs b/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs index 0f4e5023f..6da7b15ee 100644 --- a/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs +++ b/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs @@ -19,8 +19,8 @@ FeederDancer.Gradual = false; FeederDancer.K = 0; FeederDancer.X = 0; FeederDancer.PulsePerMmSpring = 0; -FeederDancer.MaximalMovementMm = 20; -FeederDancer.ZeroPoint = 14182; +FeederDancer.MaximalMovementMm = 15; +FeederDancer.ZeroPoint = 9563; FeederDancer.ResolutionBits = 14; FeederDancer.ArmLength = 126; @@ -30,8 +30,8 @@ PoolerDancer.Gradual = false; PoolerDancer.K = 0; PoolerDancer.X = 0; PoolerDancer.PulsePerMmSpring = 0; -PoolerDancer.MaximalMovementMm = 20; -PoolerDancer.ZeroPoint = 13247; +PoolerDancer.MaximalMovementMm = 15; +PoolerDancer.ZeroPoint = 7027; PoolerDancer.ResolutionBits = 14; PoolerDancer.ArmLength = 126; @@ -41,8 +41,8 @@ WinderDancer.Gradual = false; WinderDancer.K = 0; WinderDancer.X = 0; WinderDancer.PulsePerMmSpring = 0; -WinderDancer.MaximalMovementMm = 20; -WinderDancer.ZeroPoint = 11193; +WinderDancer.MaximalMovementMm = 15; +WinderDancer.ZeroPoint = 9041; WinderDancer.ResolutionBits = 14; WinderDancer.ArmLength = 126; diff --git a/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs index 6eda1d60c..ca12f0401 100644 --- a/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs +++ b/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs @@ -81,8 +81,8 @@ FeederDancer.Gradual = false; FeederDancer.K = 0; FeederDancer.X = 0; FeederDancer.PulsePerMmSpring = 0; -FeederDancer.MaximalMovementMm = 20; -FeederDancer.ZeroPoint = 14182; +FeederDancer.MaximalMovementMm = 15; +FeederDancer.ZeroPoint = 9563; FeederDancer.ResolutionBits = 14; FeederDancer.ArmLength = 126; @@ -92,8 +92,8 @@ PoolerDancer.Gradual = false; PoolerDancer.K = 0; PoolerDancer.X = 0; PoolerDancer.PulsePerMmSpring = 0; -PoolerDancer.MaximalMovementMm = 20; -PoolerDancer.ZeroPoint = 13247; +PoolerDancer.MaximalMovementMm = 15; +PoolerDancer.ZeroPoint = 7027; PoolerDancer.ResolutionBits = 14; PoolerDancer.ArmLength = 126; @@ -103,8 +103,8 @@ WinderDancer.Gradual = false; WinderDancer.K = 0; WinderDancer.X = 0; WinderDancer.PulsePerMmSpring = 0; -WinderDancer.MaximalMovementMm = 20; -WinderDancer.ZeroPoint = 11193; +WinderDancer.MaximalMovementMm = 15; +WinderDancer.ZeroPoint = 9041; WinderDancer.ResolutionBits = 14; WinderDancer.ArmLength = 126; @@ -113,8 +113,8 @@ FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdrivin FeederMotor.MinFrequency = 0; FeederMotor.MaxFrequency = 1000000; FeederMotor.SetMicroStep = 1; -FeederMotor.MicroStep = 8; -FeederMotor.MaxChangeSlope = 4095; +FeederMotor.MicroStep = 1; +FeederMotor.MaxChangeSlope = 10000; FeederMotor.HighLengthMicroSecond = 0; FeederMotor.SpeedMaster = false; FeederMotor.PulsePerRound = 200; @@ -139,14 +139,14 @@ DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDri DryerMotor.MinFrequency = 0; DryerMotor.MaxFrequency = 1000000; DryerMotor.SetMicroStep = 1; -DryerMotor.MicroStep = 8; -DryerMotor.MaxChangeSlope = 4095; +DryerMotor.MicroStep = 1; +DryerMotor.MaxChangeSlope = 1000; DryerMotor.HighLengthMicroSecond = 0; DryerMotor.SpeedMaster = true; DryerMotor.PulsePerRound = 200; DryerMotor.PulleyRadius = 1.05; DryerMotor.ConfigWord = 0x1c80; -DryerMotor.DirectionThreadWize = false; +DryerMotor.DirectionThreadWize = true; DryerMotor.KvalHold = 0x35; DryerMotor.KvalRun = 0x7f; DryerMotor.KvalAcc = 0x7f; @@ -196,7 +196,7 @@ WinderMotor.MaxChangeSlope = 0x7ff; WinderMotor.HighLengthMicroSecond = 0; WinderMotor.SpeedMaster = false; WinderMotor.PulsePerRound = 200; -WinderMotor.PulleyRadius = 0.8; +WinderMotor.PulleyRadius = 1.68; WinderMotor.ConfigWord = 0x1CA0; WinderMotor.DirectionThreadWize = false; WinderMotor.KvalHold = 0x08; @@ -272,7 +272,7 @@ RightRockerMotor.MinFrequency = 0; RightRockerMotor.MaxFrequency = 1000000; RightRockerMotor.SetMicroStep = 1; RightRockerMotor.MicroStep = 4; -RightRockerMotor.MaxChangeSlope = 4095; +RightRockerMotor.MaxChangeSlope = 10000; RightRockerMotor.HighLengthMicroSecond = 0; RightRockerMotor.SpeedMaster = false; RightRockerMotor.PulsePerRound = 200; @@ -292,75 +292,8 @@ RightRockerMotor.IntSpd = 0x44B8; RightRockerMotor.FnSlpAcc = 0x14; RightRockerMotor.FnSlpDec = 0x14; -HardwareMotor Dispenser4Motor = new HardwareMotor(); -Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7; -/*Dispenser4Motor.MinFrequency = 0; -Dispenser4Motor.MaxFrequency = 1000000; -Dispenser4Motor.SetMicroStep = 1; -Dispenser4Motor.MicroStep = 8; -Dispenser4Motor.MaxChangeSlope = 0x7FF; -Dispenser4Motor.HighLengthMicroSecond = 0; -Dispenser4Motor.SpeedMaster = false; -Dispenser4Motor.PulsePerRound = 200; -Dispenser4Motor.PulleyRadius = 1.68; -Dispenser4Motor.ConfigWord = 0x1CA0; -Dispenser4Motor.DirectionThreadWize = true; -Dispenser4Motor.KvalHold = 0x35; -Dispenser4Motor.KvalRun = 0x7f; -Dispenser4Motor.KvalAcc = 0x7f; -Dispenser4Motor.KvalDec = 0x7f; -Dispenser4Motor.OverCurrentThreshold = 0xF; -Dispenser4Motor.StallThreshold = 0x7F; -Dispenser4Motor.ThermalCompensationFactor = 0; -Dispenser4Motor.LowSpeedOptimization = false; -Dispenser4Motor.StSlp = 0x20; -Dispenser4Motor.IntSpd = 0x1A13; -Dispenser4Motor.FnSlpAcc = 0x50; -Dispenser4Motor.FnSlpDec = 0x50; -*/ -Dispenser4Motor.MinFrequency = 0; -Dispenser4Motor.MaxFrequency = 1000000; -Dispenser4Motor.SetMicroStep = 1; -Dispenser4Motor.MicroStep = 1; -Dispenser4Motor.MaxChangeSlope = 10000; -Dispenser4Motor.HighLengthMicroSecond = 0; -Dispenser4Motor.SpeedMaster = false; -Dispenser4Motor.PulsePerRound = 200; -Dispenser4Motor.PulleyRadius = 1.25; -Dispenser4Motor.ConfigWord = 0x1C80; -Dispenser4Motor.DirectionThreadWize = true; -Dispenser4Motor.KvalHold = 0x35; -Dispenser4Motor.KvalRun = 0x7f; -Dispenser4Motor.KvalAcc = 0x7f; -Dispenser4Motor.KvalDec = 0x7f; -Dispenser4Motor.OverCurrentThreshold = 7; -Dispenser4Motor.StallThreshold = 0x1F; -Dispenser4Motor.ThermalCompensationFactor = 0; -Dispenser4Motor.LowSpeedOptimization = false; -Dispenser4Motor.StSlp = 0x20; -Dispenser4Motor.IntSpd = 0x1A13; -Dispenser4Motor.FnSlpAcc = 0x50; -Dispenser4Motor.FnSlpDec = 0x50; - -HardwareDispenser hardwareDispenser = new HardwareDispenser(); -hardwareDispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser; -hardwareDispenser.Index = 6; -hardwareDispenser.NlPerPulse = 2.4; -hardwareDispenser.Capacity = 500; - -JobDispenser jobDispenser = new JobDispenser(); -jobDispenser.Index = 0; -jobDispenser.Volume = 0; -jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto; -jobDispenser.NanolitterPerSecond = 0; -jobDispenser.NanoliterPerCentimeter = 0; -jobDispenser.PulsePerSecond = 0; -jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan; -jobDispenser.LiquidMaxNanoliterPerCentimeter = 0; -jobDispenser.NanoliterPerPulse = 0; - HardwareWinder Winder = new HardwareWinder(); Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; Winder.MillimeterPerRotation = 20; diff --git a/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs b/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs index 3ebf70b29..1228b7de7 100644 --- a/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs +++ b/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs @@ -25,10 +25,10 @@ FeederMotor.PulsePerRound = 200; FeederMotor.PulleyRadius = 1.25; FeederMotor.ConfigWord = 0x1C80; FeederMotor.DirectionThreadWize = true; -FeederMotor.KvalHold = 0x8; -FeederMotor.KvalRun = 0x35; +FeederMotor.KvalHold = 0x35; +FeederMotor.KvalRun = 0x7f; FeederMotor.KvalAcc = 0x7f; -FeederMotor.KvalDec = 0x27; +FeederMotor.KvalDec = 0x7f; FeederMotor.OverCurrentThreshold = 7; FeederMotor.StallThreshold = 0x1F; FeederMotor.ThermalCompensationFactor = 0; @@ -37,7 +37,6 @@ FeederMotor.StSlp = 0x20; FeederMotor.IntSpd = 0x1A13; FeederMotor.FnSlpAcc = 0x50; FeederMotor.FnSlpDec = 0x50; -FeederMotor.FsSpd = 0x27; HardwareMotor DryerMotor = new HardwareMotor(); DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving; @@ -51,11 +50,11 @@ DryerMotor.SpeedMaster = true; DryerMotor.PulsePerRound = 200; DryerMotor.PulleyRadius = 1.05; DryerMotor.ConfigWord = 0x1c80; -DryerMotor.DirectionThreadWize = false; -DryerMotor.KvalHold = 0x8; -DryerMotor.KvalRun = 0x35; +DryerMotor.DirectionThreadWize = true; +DryerMotor.KvalHold = 0x35; +DryerMotor.KvalRun = 0x7f; DryerMotor.KvalAcc = 0x7f; -DryerMotor.KvalDec = 0x27; +DryerMotor.KvalDec = 0x7f; DryerMotor.OverCurrentThreshold = 7; DryerMotor.StallThreshold = 0x1F; DryerMotor.ThermalCompensationFactor = 0; @@ -64,7 +63,6 @@ DryerMotor.StSlp = 0x20; DryerMotor.IntSpd = 0x1A13; DryerMotor.FnSlpAcc = 0x50; DryerMotor.FnSlpDec = 0x50; -DryerMotor.FsSpd = 0x27; HardwareMotor PoolerMotor = new HardwareMotor(); PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving; @@ -79,10 +77,10 @@ PoolerMotor.PulsePerRound = 200; PoolerMotor.PulleyRadius = 1.25; PoolerMotor.ConfigWord = 0x1C80; PoolerMotor.DirectionThreadWize = true; -PoolerMotor.KvalHold = 0x8; -PoolerMotor.KvalRun = 0x35; +PoolerMotor.KvalHold = 0x35; +PoolerMotor.KvalRun = 0x7f; PoolerMotor.KvalAcc = 0x7f; -PoolerMotor.KvalDec = 0x27; +PoolerMotor.KvalDec = 0x7f; PoolerMotor.OverCurrentThreshold = 7; PoolerMotor.StallThreshold = 0x1F; PoolerMotor.ThermalCompensationFactor = 0; @@ -91,7 +89,6 @@ PoolerMotor.StSlp = 20; PoolerMotor.IntSpd = 0x1A13; PoolerMotor.FnSlpAcc = 0x50; PoolerMotor.FnSlpDec = 0x50; -PoolerMotor.FsSpd = 0x27; HardwareMotor WinderMotor = new HardwareMotor(); WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder; @@ -99,17 +96,17 @@ WinderMotor.MinFrequency = 0; WinderMotor.MaxFrequency = 100000; WinderMotor.SetMicroStep = 1; WinderMotor.MicroStep = 16; -WinderMotor.MaxChangeSlope = 0x7ff; +WinderMotor.MaxChangeSlope = 4095; WinderMotor.HighLengthMicroSecond = 0; WinderMotor.SpeedMaster = false; WinderMotor.PulsePerRound = 200; -WinderMotor.PulleyRadius = 0.8; +WinderMotor.PulleyRadius = 1.68; WinderMotor.ConfigWord = 0x1CA0; WinderMotor.DirectionThreadWize = false; WinderMotor.KvalHold = 0x08; WinderMotor.KvalRun = 0x20; WinderMotor.KvalAcc = 0x20; -WinderMotor.KvalDec = 0x3ff; +WinderMotor.KvalDec = 0x20; WinderMotor.OverCurrentThreshold = 0xF; WinderMotor.StallThreshold = 0x7F; WinderMotor.ThermalCompensationFactor = 0; @@ -118,7 +115,6 @@ WinderMotor.StSlp = 0x7; WinderMotor.IntSpd = 0x22C5; WinderMotor.FnSlpAcc = 0x15; WinderMotor.FnSlpDec = 0x15; -WinderMotor.FsSpd = 0x3ff; HardwareMotor ScrewMotor = new HardwareMotor(); ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew; @@ -126,7 +122,7 @@ ScrewMotor.MinFrequency = 0; ScrewMotor.MaxFrequency = 100000; ScrewMotor.SetMicroStep = 1; ScrewMotor.MicroStep = 8; -ScrewMotor.MaxChangeSlope = 0x7FF; +ScrewMotor.MaxChangeSlope = 4095; ScrewMotor.HighLengthMicroSecond = 0; ScrewMotor.SpeedMaster = false; ScrewMotor.PulsePerRound = 200; @@ -136,7 +132,7 @@ ScrewMotor.DirectionThreadWize = true; ScrewMotor.KvalHold = 0x1; ScrewMotor.KvalRun = 0x20; ScrewMotor.KvalAcc = 0x20; -ScrewMotor.KvalDec = 0x27; +ScrewMotor.KvalDec = 0x20; ScrewMotor.OverCurrentThreshold = 0xF; ScrewMotor.StallThreshold = 0x7F; ScrewMotor.ThermalCompensationFactor = 0; @@ -145,7 +141,6 @@ ScrewMotor.StSlp = 0x7; ScrewMotor.IntSpd = 0x22C5; ScrewMotor.FnSlpAcc = 0x15; ScrewMotor.FnSlpDec = 0x15; -ScrewMotor.FsSpd = 0x27; HardwareMotor LeftRockerMotor = new HardwareMotor(); @@ -154,17 +149,17 @@ LeftRockerMotor.MinFrequency = 0; LeftRockerMotor.MaxFrequency = 1000000; LeftRockerMotor.SetMicroStep = 1; LeftRockerMotor.MicroStep = 4; -LeftRockerMotor.MaxChangeSlope = 10000; +LeftRockerMotor.MaxChangeSlope = 4095; LeftRockerMotor.HighLengthMicroSecond = 0; LeftRockerMotor.SpeedMaster = false; LeftRockerMotor.PulsePerRound = 200; LeftRockerMotor.PulleyRadius = 1.3; LeftRockerMotor.ConfigWord = 0xC80; -LeftRockerMotor.DirectionThreadWize = false; +LeftRockerMotor.DirectionThreadWize = true; LeftRockerMotor.KvalHold = 0x28; LeftRockerMotor.KvalRun = 0x5f; LeftRockerMotor.KvalAcc = 0x5f; -LeftRockerMotor.KvalDec = 0x27; +LeftRockerMotor.KvalDec = 0x5f; LeftRockerMotor.OverCurrentThreshold = 7; LeftRockerMotor.StallThreshold = 0x1F; LeftRockerMotor.ThermalCompensationFactor = 0; @@ -173,8 +168,32 @@ LeftRockerMotor.StSlp = 6; LeftRockerMotor.IntSpd = 0x44B8; LeftRockerMotor.FnSlpAcc = 0x14; LeftRockerMotor.FnSlpDec = 0x14; -LeftRockerMotor.FsSpd = 0x27; +HardwareMotor Dispenser4Motor = new HardwareMotor(); +Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7; +Dispenser4Motor.MinFrequency = 0; +Dispenser4Motor.MaxFrequency = 1000000; +Dispenser4Motor.SetMicroStep = 1; +Dispenser4Motor.MicroStep = 8; +Dispenser4Motor.MaxChangeSlope = 4095; +Dispenser4Motor.HighLengthMicroSecond = 0; +Dispenser4Motor.SpeedMaster = false; +Dispenser4Motor.PulsePerRound = 200; +Dispenser4Motor.PulleyRadius = 1.25; +Dispenser4Motor.ConfigWord = 0x1C80; +Dispenser4Motor.DirectionThreadWize = true; +Dispenser4Motor.KvalHold = 0x35; +Dispenser4Motor.KvalRun = 0x7f; +Dispenser4Motor.KvalAcc = 0x7f; +Dispenser4Motor.KvalDec = 0x7f; +Dispenser4Motor.OverCurrentThreshold = 7; +Dispenser4Motor.StallThreshold = 0x1F; +Dispenser4Motor.ThermalCompensationFactor = 0; +Dispenser4Motor.LowSpeedOptimization = false; +Dispenser4Motor.StSlp = 20; +Dispenser4Motor.IntSpd = 0x1A13; +Dispenser4Motor.FnSlpAcc = 0x50; +Dispenser4Motor.FnSlpDec = 0x50; HardwareMotor RightRockerMotor = new HardwareMotor(); RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading; @@ -192,7 +211,7 @@ RightRockerMotor.DirectionThreadWize = true; RightRockerMotor.KvalHold = 0x28; RightRockerMotor.KvalRun = 0x5f; RightRockerMotor.KvalAcc = 0x5f; -RightRockerMotor.KvalDec = 0x27; +RightRockerMotor.KvalDec = 0x5f; RightRockerMotor.OverCurrentThreshold = 7; RightRockerMotor.StallThreshold = 0x1F; RightRockerMotor.ThermalCompensationFactor = 0; @@ -201,115 +220,8 @@ RightRockerMotor.StSlp = 6; RightRockerMotor.IntSpd = 0x44B8; RightRockerMotor.FnSlpAcc = 0x14; RightRockerMotor.FnSlpDec = 0x14; -RightRockerMotor.FsSpd = 0x27; - -HardwareMotor Dispenser4Motor = new HardwareMotor(); -Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser4; -Dispenser4Motor.MinFrequency = 0; -Dispenser4Motor.MaxFrequency = 100000; -Dispenser4Motor.SetMicroStep = 1; -Dispenser4Motor.MicroStep = 16; -Dispenser4Motor.MaxChangeSlope = 0x7FF; -Dispenser4Motor.HighLengthMicroSecond = 0; -Dispenser4Motor.SpeedMaster = false; -Dispenser4Motor.PulsePerRound = 400; -Dispenser4Motor.PulleyRadius = 1.68; -Dispenser4Motor.ConfigWord = 0x1CA0; -Dispenser4Motor.DirectionThreadWize = true; -Dispenser4Motor.KvalHold = 0x21; -Dispenser4Motor.KvalRun = 0xc0; -Dispenser4Motor.KvalAcc = 0x2e; -Dispenser4Motor.KvalDec = 0x3ff; -Dispenser4Motor.OverCurrentThreshold = 0xF; -Dispenser4Motor.StallThreshold = 0x1F; -Dispenser4Motor.ThermalCompensationFactor = 0; -Dispenser4Motor.LowSpeedOptimization = false; -Dispenser4Motor.StSlp = 0x9; -Dispenser4Motor.IntSpd = 0x1AD2; -Dispenser4Motor.FnSlpAcc = 0x26; -Dispenser4Motor.FnSlpDec = 0x26; -Dispenser4Motor.FsSpd = 0x3ff; - -HardwareMotor Dispenser7Motor = new HardwareMotor(); -Dispenser7Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7; -Dispenser7Motor.MinFrequency = 0; -Dispenser7Motor.MaxFrequency = 100000; -Dispenser7Motor.SetMicroStep = 1; -Dispenser7Motor.MicroStep = 16; -Dispenser7Motor.MaxChangeSlope = 0x7FF; -Dispenser7Motor.HighLengthMicroSecond = 0; -Dispenser7Motor.SpeedMaster = false; -Dispenser7Motor.PulsePerRound = 400; -Dispenser7Motor.PulleyRadius = 1.68; -Dispenser7Motor.ConfigWord = 0x1CA0; -Dispenser7Motor.DirectionThreadWize = true; -Dispenser7Motor.KvalHold = 0x21; -Dispenser7Motor.KvalRun = 0xc0; -Dispenser7Motor.KvalAcc = 0x2e; -Dispenser7Motor.KvalDec = 0x3ff; -Dispenser7Motor.OverCurrentThreshold = 0xF; -Dispenser7Motor.StallThreshold = 0x1F; -Dispenser7Motor.ThermalCompensationFactor = 0; -Dispenser7Motor.LowSpeedOptimization = false; -Dispenser7Motor.StSlp = 0x9; -Dispenser7Motor.IntSpd = 0x1AD2; -Dispenser7Motor.FnSlpAcc = 0x26; -Dispenser7Motor.FnSlpDec = 0x26; -Dispenser7Motor.FsSpd = 0x3ff; -HardwareMotor Dispenser8Motor = new HardwareMotor(); -Dispenser8Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser8; -Dispenser8Motor.MinFrequency = 0; -Dispenser8Motor.MaxFrequency = 100000; -Dispenser8Motor.SetMicroStep = 1; -Dispenser8Motor.MicroStep = 16; -Dispenser8Motor.MaxChangeSlope = 0x7FF; -Dispenser8Motor.HighLengthMicroSecond = 0; -Dispenser8Motor.SpeedMaster = false; -Dispenser8Motor.PulsePerRound = 400; -Dispenser8Motor.PulleyRadius = 1.68; -Dispenser8Motor.ConfigWord = 0x1CA0; -Dispenser8Motor.DirectionThreadWize = true; -Dispenser8Motor.KvalHold = 0x21; -Dispenser8Motor.KvalRun = 0xc0; -Dispenser8Motor.KvalAcc = 0x2e; -Dispenser8Motor.KvalDec = 0x3ff; -Dispenser8Motor.OverCurrentThreshold = 0xF; -Dispenser8Motor.StallThreshold = 0x1F; -Dispenser8Motor.ThermalCompensationFactor = 0; -Dispenser8Motor.LowSpeedOptimization = false; -Dispenser8Motor.StSlp = 0x9; -Dispenser8Motor.IntSpd = 0x1AD2; -Dispenser8Motor.FnSlpAcc = 0x26; -Dispenser8Motor.FnSlpDec = 0x26; -Dispenser8Motor.FsSpd = 0x3ff; -HardwareMotor DryerLoadarm = new HardwareMotor(); -DryerLoadarm.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerLoadarm; -DryerLoadarm.MinFrequency = 0; -DryerLoadarm.MaxFrequency = 1000000; -DryerLoadarm.SetMicroStep = 1; -DryerLoadarm.MicroStep = 1; -DryerLoadarm.MaxChangeSlope = 10000; -DryerLoadarm.HighLengthMicroSecond = 0; -DryerLoadarm.SpeedMaster = false; -DryerLoadarm.PulsePerRound = 200; -DryerLoadarm.PulleyRadius = 1.25; -DryerLoadarm.ConfigWord = 0x1C80; -DryerLoadarm.DirectionThreadWize = false; -DryerLoadarm.KvalHold = 0x35; -DryerLoadarm.KvalRun = 0x7f; -DryerLoadarm.KvalAcc = 0x7f; -DryerLoadarm.KvalDec = 0x27; -DryerLoadarm.OverCurrentThreshold = 7; -DryerLoadarm.StallThreshold = 0x1F; -DryerLoadarm.ThermalCompensationFactor = 0; -DryerLoadarm.LowSpeedOptimization = false; -DryerLoadarm.StSlp = 0x20; -DryerLoadarm.IntSpd = 0x1A13; -DryerLoadarm.FnSlpAcc = 0x50; -DryerLoadarm.FnSlpDec = 0x50; -DryerLoadarm.FsSpd = 0x27; HardwareWinder Winder = new HardwareWinder(); Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder; diff --git a/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs b/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs index 984ed00e2..ace46947b 100644 --- a/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs +++ b/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs @@ -8,8 +8,6 @@ using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Tango.PMR.Hardware; -using Tango.PMR.Printing; -using Tango.PMR.Stubs; using Tango.Stubs; HardwarePidControl FeederPidControl = new HardwarePidControl(); @@ -58,7 +56,7 @@ HardwarePidControl WinderPidControl = new HardwarePidControl(); WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder; WinderPidControl.OutputProportionalPowerLimit = 1.0; WinderPidControl.OutputProportionalBand = 5; -WinderPidControl.IntegralTime = 7; +WinderPidControl.IntegralTime = 5; WinderPidControl.DerivativeTime = 0; WinderPidControl.SensorCorrectionAdjustment = 0; WinderPidControl.SensorMinValue = 0; @@ -72,5 +70,5 @@ WinderPidControl.ProcessVariableSamplingRate = 1000; WinderPidControl.PvInputFilterFactorMode = 4; WinderPidControl.OutputProportionalCycleTime = 0; WinderPidControl.AcHeatersHalfCycleTime = 0; -WinderPidControl.ProportionalGain = 12.0; +WinderPidControl.ProportionalGain = 11.0; diff --git a/Software/Stubs Collection/stubs/calculate - Copy.cs b/Software/Stubs Collection/stubs/calculate - Copy.cs new file mode 100644 index 000000000..22a83dd2d --- /dev/null +++ b/Software/Stubs Collection/stubs/calculate - Copy.cs @@ -0,0 +1,22 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + for (int i = 0; i < 10; i++) + { + // Double : A + // Double : B + stubManager.Run("calculate", 10, 5); + Thread.Sleep(10); + } +} + diff --git a/Software/Stubs Collection/stubs/calculate.cs b/Software/Stubs Collection/stubs/calculate.cs new file mode 100644 index 000000000..b473a53da --- /dev/null +++ b/Software/Stubs Collection/stubs/calculate.cs @@ -0,0 +1,34 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + for (int i = 0; i < 10; i++) + { + // Request ---- + // Double : A + // Double : B + + // Response ---- + // Double : Sum + + var response = stubManager.Run<CalculateResponse>("calculate", 10, 5); + + if (response.Sum == 15) + { + stubManager.Write(i); + stubManager.WriteLine(" OK!"); + } + Thread.Sleep(10); + } +} + diff --git a/Software/Stubs Collection/stubs/main_led.cs b/Software/Stubs Collection/stubs/main_led.cs new file mode 100644 index 000000000..3d4ac5fbf --- /dev/null +++ b/Software/Stubs Collection/stubs/main_led.cs @@ -0,0 +1,25 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Hardware; +using Tango.PMR.Printing; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + +StubGPIOWriteBitRequest stubGPIOWriteBitRequest = new StubGPIOWriteBitRequest(); +stubGPIOWriteBitRequest.PortId = "P"; +stubGPIOWriteBitRequest.PinId = 4; +stubGPIOWriteBitRequest.BitToWrite = true; + var response = stubManager.Run<StubGPIOWriteBitResponse>(stubGPIOWriteBitRequest); + +} + diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_Motors.cs index 9f54b0cc2..c92c2cae6 100644 --- a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_Motors.cs +++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_Motors.cs @@ -10,8 +10,8 @@ using System.Collections.Generic; using Tango.PMR.Stubs; using Tango.Stubs.UI; -include "D:\stubs\michael stubs\Tango_Defines_Basic.cs" -include "D:\stubs\michael stubs\Interfaces\Tango_Defines_Motors.cs" +include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs" +include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs" int Motor_Dispenser(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) @@ -37,10 +37,10 @@ int Motor_Dispenser(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) public void OnExecute(StubManager stubManager) { -// Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_1_TX_01, F2_MOTO_DISPENSER_A1_1_TX_00); + Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_1_TX_01, F2_MOTO_DISPENSER_A1_1_TX_00); //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_2_TX_01, F2_MOTO_DISPENSER_A1_2_TX_00); //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_3_TX_01, F2_MOTO_DISPENSER_A1_3_TX_00); - Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_4_TX_01, F2_MOTO_DISPENSER_A1_4_TX_00); + //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_4_TX_01, F2_MOTO_DISPENSER_A1_4_TX_00); //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_5_TX_01, F2_MOTO_DISPENSER_A1_5_TX_00); //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_6_TX_01, F2_MOTO_DISPENSER_A1_6_TX_00); //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_7_TX_01, F2_MOTO_DISPENSER_A1_7_TX_00); diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_PT100.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_PT100.cs index 6fd0c8237..2f41684e5 100644 --- a/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_PT100.cs +++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_PT100.cs @@ -10,8 +10,8 @@ using System.Collections.Generic; using Tango.PMR.Stubs; using Tango.Stubs.UI; -include "D:\stubs\michael stubs\Tango_Defines_Basic.cs" -include "D:\stubs\michael stubs\Interfaces\Tango_Defines_PT100.cs" +include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs" +include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_PT100.cs" Int32 ADS1220_Setup(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 BusyBitNo) @@ -68,7 +68,7 @@ public void OnExecute(StubManager stubManager) stubManager.Write("\nF2_ANALOG_DYEINGH_TEMP1_1_TX_01: "); stubManager.WriteHex( rv ,8); */ - for (int i=0; i < 100; i++) + for (int i=0; i < 1000; i++) { rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DRYER_TEMP1_1_TX_01, F2_ANALOG_DRYER_TEMP1_1_TX_00, 0); diff --git a/Software/Stubs Collection/stubs/mot run.cs b/Software/Stubs Collection/stubs/mot run.cs new file mode 100644 index 000000000..ff614c4cb --- /dev/null +++ b/Software/Stubs Collection/stubs/mot run.cs @@ -0,0 +1,83 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + +//stubManager.Run("StubMotorStopRequest" ,22, 1); // 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop +//Thread.Sleep(1000); + +// Request ---- +// UInt32 : MotorID +// UInt32 : MicroSteps +// Boolean : SetMicroSteps +// UInt32 : ACC +// Boolean : SetACC +// UInt32 : DEC +// Boolean : SetDec +// UInt32 : MaxSpeed +// Boolean : SetMaxSpeed + + //stubManager.Run<StubMotorInitResponse>("StubMotorInitRequest" ,22, 1, true, 0x0ff, true, 0x0ff, true, 0x3ff, true); // 0x3ff for QSH2818-32-07-006 roker + //stubManager.Run<StubMotorInitResponse>("StubMotorInitRequest" ,21, 0, true, 0x0ff, true, 0x0ff, true, 50000, true); // fidder + //stubManager.Run<StubMotorInitResponse>("StubMotorInitRequest" ,0, 0, true, 0, true, 0, true, 0, true); + + // Request ---- +// UInt32 : MotorID +// UInt32 : MicroSteps +// Boolean : SetMicroSteps +// UInt32 : ACC +// Boolean : SetACC +// UInt32 : DEC +// Boolean : SetDec +// UInt32 : MaxSpeed +// Boolean : SetMaxSpeed +// UInt32 : MinSpeedLSPDOPT +// Boolean : SetMinSpeedLSPDOPT +// UInt32 : Config +// UInt32 : KVALHOLD +// UInt32 : KVALRUN +// UInt32 : KVALACC +// UInt32 : KVALDEC +// UInt32 : STSLP +// UInt32 : INTSPD +// UInt32 : FNSLPACC +// UInt32 : FNSLPDEC + +// Response ---- +// UInt32 : MotorID +// UInt32 : Status + + + //stubManager.Run<StubMotorInitResponse>("StubMotorInitRequest" ,18, 0, true, 0x0ff, true, 0x0ff, true, 50000, true, 0, true, 1, 1, 1, 1, 1, 1, 1, 1, 1); + + //stubManager.Run("StubMotorStopRequest" ,18, 1); // 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop + + //Thread.Sleep(1000); + + stubManager.Run("StubMotorRunRequest" ,12, false, 2000 ); //5000 fidder (18 TESTED) + + //Thread.Sleep(10000); + //stubManager.Run<StubMotorStatusResponse>("StubMotorStatusRequest" ,15, true); + + //Thread.Sleep(1000); + // Request ---- +// UInt32 : MotorID + +// Response ---- +// UInt32 : MotorID +// Double : Speed + //stubManager.Run<StubMotorSpeedResponse>("StubMotorSpeedRequest" ,15); + +//stubManager.Run("StubMotorStopRequest" ,15, 3); // 3 - SoftHiZ / 2 - HardHiZ / 1 - SoftStop / 0 - HardStop +} + diff --git a/Software/Stubs Collection/stubs/mot stop.cs b/Software/Stubs Collection/stubs/mot stop.cs new file mode 100644 index 000000000..24cfe16e6 --- /dev/null +++ b/Software/Stubs Collection/stubs/mot stop.cs @@ -0,0 +1,29 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + + + //stubManager.Run<StubMotorStatusResponse>("StubMotorStatusRequest" ,18, true); + + //Thread.Sleep(1000); + // without init - don't start with this command !!!!!!!!!!! + stubManager.Run("StubMotorStopRequest" ,14, 3); // 3 - SoftHiZ / 2 - HardHiZ / 1 - SoftStop / 0 - HardStop + stubManager.Run("StubMotorStopRequest" ,15, 3); + + stubManager.Run("StubMotorStopRequest" ,18, 3); + + stubManager.Run("StubMotorStopRequest" ,12, 3); +} + diff --git a/Software/Stubs Collection/stubs/motor - read speed.cs b/Software/Stubs Collection/stubs/motor - read speed.cs new file mode 100644 index 000000000..14c9f5d6f --- /dev/null +++ b/Software/Stubs Collection/stubs/motor - read speed.cs @@ -0,0 +1,25 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + Thread.Sleep(10000); + // Request ---- +// UInt32 : MotorID + +// Response ---- +// UInt32 : MotorID +// Double : Speed + +var response = stubManager.Run<StubMotorSpeedResponse>("StubMotorSpeedRequest" ,0); +} + diff --git a/Software/Stubs Collection/stubs/motor.cs b/Software/Stubs Collection/stubs/motor.cs new file mode 100644 index 000000000..a3c780d0c --- /dev/null +++ b/Software/Stubs Collection/stubs/motor.cs @@ -0,0 +1,38 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubMotorInitRequest" ,11, 0, false, 0, false, 0, false, 0, false); //Init - use embedded hardcodded values + //Thread.Sleep(100); + + for (int i = 0; i < 3; i++) + { + stubManager.Run("StubMotorRunRequest" ,22, true, 500); //step/sec + Thread.Sleep(1000); + stubManager.Run("StubMotorSpeedRequest" ,33); + stubManager.Run("StubMotorPositionRequest" ,44); + stubManager.Run("StubMotorStatusRequest" ,55, true); + + stubManager.Run("StubMotorRunRequest" ,66, false, 500); + Thread.Sleep(1000); + stubManager.Run("StubMotorSpeedRequest" ,77); + stubManager.Run("StubMotorPositionRequest" ,88); + stubManager.Run("StubMotorStatusRequest" ,99, true); + } + + stubManager.Run("StubMotorStopRequest" ,111, 0); // 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop + Thread.Sleep(1000); + stubManager.Run("StubMotorStatusRequest" ,222, true); + stubManager.Run("StubMotorPositionRequest" ,333); + +} + diff --git a/Software/Stubs Collection/stubs/motor_loop.cs b/Software/Stubs Collection/stubs/motor_loop.cs new file mode 100644 index 000000000..a49652685 --- /dev/null +++ b/Software/Stubs Collection/stubs/motor_loop.cs @@ -0,0 +1,48 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + // UInt32 : MotorID + // UInt32 : MicroSteps + // Boolean : SetMicroSteps + // UInt32 : ACC + // Boolean : SetACC + // UInt32 : DEC + // Boolean : SetDec + // UInt32 : MaxSpeed + // Boolean : SetMaxSpeed + stubManager.Run("StubMotorInitRequest" ,0, 0, false, 0, false, 0, false, 0, false); // UInt32 : MotorID + // Boolean : Direction + // Double : Speed + for (int i = 0; i < 10; i++) + { + stubManager.Run("StubMotorRunRequest" ,0, false, 300);//step/sec + Thread.Sleep(100); + // UInt32 : MotorID + stubManager.Run("StubMotorPositionRequest" ,0); + // UInt32 : MotorID + // Boolean : Direction + // Double : Speed + stubManager.Run("StubMotorRunRequest" ,0, true, 300);//step/sec + Thread.Sleep(100); + // UInt32 : MotorID + stubManager.Run("StubMotorPositionRequest" ,0); + } + // UInt32 : MotorID + // Boolean : ClearStatus + stubManager.Run("StubMotorStatusRequest" ,0, true); + // UInt32 : MotorID + // UInt32 : StopCMD + stubManager.Run("StubMotorStopRequest" ,0, 3);// 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop +} + diff --git a/Software/Stubs Collection/stubs/motor_pos.cs b/Software/Stubs Collection/stubs/motor_pos.cs new file mode 100644 index 000000000..16832b14e --- /dev/null +++ b/Software/Stubs Collection/stubs/motor_pos.cs @@ -0,0 +1,41 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // UInt32 : MotorID + // UInt32 : MicroSteps + // Boolean : SetMicroSteps + // UInt32 : ACC + // Boolean : SetACC + // UInt32 : DEC + // Boolean : SetDec + // UInt32 : MaxSpeed + // Boolean : SetMaxSpeed + stubManager.Run("StubMotorInitRequest" ,11, 0, false, 0, false, 0, false, 0, false); //Init - use embedded hardcodded values + + // UInt32 : MotorID + stubManager.Run("StubMotorPositionRequest" ,22); + + for (int i = 0; i < 100; i++) + { + // UInt32 : MotorID + // Boolean : Direction + // UInt32 : Position + stubManager.Run("StubMotorMovRequest" ,33, true, 3); // set position + Thread.Sleep(100); + + // UInt32 : MotorID + stubManager.Run("StubMotorPositionRequest" ,44); // Read Position + Thread.Sleep(1000); + } +} + diff --git a/Software/Stubs Collection/stubs/motor_register_cmd.cs b/Software/Stubs Collection/stubs/motor_register_cmd.cs new file mode 100644 index 000000000..0e8b8b52e --- /dev/null +++ b/Software/Stubs Collection/stubs/motor_register_cmd.cs @@ -0,0 +1,35 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // Request ---- + // UInt32 : MotorID + // UInt32 : DataToSend + // UInt32 : NBytesToSet + // UInt32 : NBytesToGet + + // Response ---- + // UInt32 : MotorID + // UInt32 : RecivedData + + + var response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,1, 0x51000E08,4 , 4); // run speed 0E08 = 1000 step/sec + + Thread.Sleep(2000); + + var response1 = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,1, 0x24,1 , 4); // Get speed + stubManager.WriteLineHex(response1.RecivedData,4); //display the speed in hex + + +} + diff --git a/Software/Stubs Collection/stubs/motor_run_cmd_read_position.cs b/Software/Stubs Collection/stubs/motor_run_cmd_read_position.cs new file mode 100644 index 000000000..d0a1edd99 --- /dev/null +++ b/Software/Stubs Collection/stubs/motor_run_cmd_read_position.cs @@ -0,0 +1,37 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + +// Request ---- +// UInt32 : MotorID +// UInt32 : MicroSteps +// Boolean : SetMicroSteps +// UInt32 : ACC +// Boolean : SetACC +// UInt32 : DEC +// Boolean : SetDec +// UInt32 : MaxSpeed +// Boolean : SetMaxSpeed + +// Response ---- +// UInt32 : MotorID +// UInt32 : Status +var response = stubManager.Run<StubMotorInitResponse>("StubMotorInitRequest" ,1, 0, true, 1, false, 1, false, 1, false); + // UInt32 : MotorID + // Boolean : Direction + // Double : Speed + stubManager.Run("StubMotorRunRequest" ,11, true, 1000); + + +} + diff --git a/Software/Stubs Collection/stubs/motort set and get position.cs b/Software/Stubs Collection/stubs/motort set and get position.cs new file mode 100644 index 000000000..7b272e456 --- /dev/null +++ b/Software/Stubs Collection/stubs/motort set and get position.cs @@ -0,0 +1,40 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // Request ---- + // UInt32 : MotorID + // Boolean : Direction + // UInt32 : Position + + // Response ---- + // UInt32 : MotorID + // UInt32 : Position + // UInt32 : StatusReg + // Boolean : Direction + // UInt32 : MotStatus + // Boolean : STEPLOSSA + // Boolean : STEPLOSSB + stubManager.Run<StubMotorMovResponse>("StubMotorMovRequest" ,18, false, 1000); + + Thread.Sleep(1000); + // Request ---- + // UInt32 : MotorID + + // Response ---- + // UInt32 : MotorID + // UInt32 : Position + stubManager.Run<StubMotorPositionResponse>("StubMotorPositionRequest" ,18); + + +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/read Device Identification 0 (DID0).cs b/Software/Stubs Collection/stubs/read Device Identification 0 (DID0).cs new file mode 100644 index 000000000..da5880d75 --- /dev/null +++ b/Software/Stubs Collection/stubs/read Device Identification 0 (DID0).cs @@ -0,0 +1,27 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ +// Request ---- +// UInt32 : Address + +// Response ---- +// UInt32 : Address +// UInt32 : Value +// String : Status +// UInt32 : StatusWord +var response = stubManager.Run<StubTivaReadRegResponse>("StubTivaReadRegRequest" ,0x400FE000); +stubManager.WriteLineHex(response.Value,8); + +} + diff --git a/Software/Stubs Collection/stubs/read FPGA version.cs b/Software/Stubs Collection/stubs/read FPGA version.cs new file mode 100644 index 000000000..58d54af2f --- /dev/null +++ b/Software/Stubs Collection/stubs/read FPGA version.cs @@ -0,0 +1,19 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // UInt32 : FPGAId + var response = stubManager.Run("StubFPGAReadVersionRequest" ,3);//1..3 *** YEAR IN HEX: YEAR 24 is 2018 + + +} + diff --git a/Software/Stubs Collection/stubs/read embedded version.cs b/Software/Stubs Collection/stubs/read embedded version.cs new file mode 100644 index 000000000..27424c029 --- /dev/null +++ b/Software/Stubs Collection/stubs/read embedded version.cs @@ -0,0 +1,23 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ +// Request ---- +// UInt32 : AnyNumber + +// Response ---- +// UInt32 : AnyNumberBack +// String : Version + stubManager.Run<StubReadEmbeddedVersionResponse>("StubReadEmbeddedVersionRequest"); +} + diff --git a/Software/Stubs Collection/stubs/run tick step every 1 sec.cs b/Software/Stubs Collection/stubs/run tick step every 1 sec.cs new file mode 100644 index 000000000..6caf393fd --- /dev/null +++ b/Software/Stubs Collection/stubs/run tick step every 1 sec.cs @@ -0,0 +1,35 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + +stubManager.Run("StubMotorStopRequest" ,111, 1); // 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop + // UInt32 : MotorID + // UInt32 : MicroSteps + // Boolean : SetMicroSteps + // UInt32 : ACC + // Boolean : SetACC + // UInt32 : DEC + // Boolean : SetDec + // UInt32 : MaxSpeed + // Boolean : SetMaxSpeed + stubManager.Run("StubMotorInitRequest" ,11, 0, true, 0, false, 0, false, 0, false); //Init - use embedded hardcodded values + + //var response = stubManager.Run<StubMotorRunStepTickResponse>("StubMotorRunStepTickRequest" ,1, true, 1); + //stubManager.Run("StubMotorRunStepTickRequest" ,1, true, 120);//60 ~ 1 sec + + stubManager.Run("StubMotorRunRequest" ,1, true, 1);//step/sec + + + +} + diff --git a/Software/Stubs Collection/stubs/screw.cs b/Software/Stubs Collection/stubs/screw.cs new file mode 100644 index 000000000..f689c75f8 --- /dev/null +++ b/Software/Stubs Collection/stubs/screw.cs @@ -0,0 +1,191 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +const Int32 FPGA1 = 0x60000000; +const Int32 FPGA2 = 0x60000400; +const Int32 FPGA3 = 0x60000800; +const Int32 TEST_REG = 0x3f0; + +const Int32 MOTO_SCREW_TX0 = 0x0280; +const Int32 MOTO_SCREW_TX1 = 0x0282; +const Int32 MOTO_SCREW_RX0 = 0x0284; +const Int32 MOTO_SCREW_RX1 = 0x0286; + +const Int32 MOTO_LDRIVING_TX1 = 0x0222; +const Int32 MOTO_LDRIVING_TX0 = 0x0220; +const Int32 MOTO_LDRIVING_RX1 = 0x0226; +const Int32 MOTO_LDRIVING_RX0 = 0x0224; + +const Int32 MOTO_LLOADING_TX1 = 0x0232; +const Int32 MOTO_LLOADING_TX0 = 0x0230; + +const Int32 MOTO_LDANCER1_TX1 = 0x02c2; +const Int32 MOTO_LDANCER1_TX0 = 0x02c0; + +const Int32 MOTO_LDANCER2_TX1 = 0x02d2; +const Int32 MOTO_LDANCER2_TX0 = 0x02d0; +const Int32 MOTO_LDANCER2_A1_AMT_OF_WORDS = 0x02d8; + +const Int32 MOTO_LPIVOT1_TX1 = 0x0302; +const Int32 MOTO_LPIVOT1_TX0 = 0x0300; +const Int32 MOTO_LPIVOT1_A1_AMT_OF_WORDS = 0x0308; + +const Int32 MOTORDRIVER_HIGHZ_COMMAND_MSB = 0xa800; +const Int32 MOTORDRIVER_HIGHZ_COMMAND_LSB = 0x0000; + +const Int32 MOTORDRIVER_RUN_COMMAND_MSB = 0x5000; +const Int32 MOTORDRIVER_RUN_COMMAND_LSB = 0x0000; + +const Int32 MOTORDRIVER_MOVE_COMMAND_MSB = 0x4000; +const Int32 MOTORDRIVER_MOVE_COMMAND_LSB = 0x0000; + +const Int32 MOTORDRIVER_RDCFG_COMMAND_MSB = 0x3800; +const Int32 MOTORDRIVER_RDCFG_COMMAND_LSB = 0x0000; + + +StubFpgaReadRegResponse Fpga_Read_Reg(Int32 Fpga, Int32 Addr) +{ + var response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" , Fpga + Addr); + response.Value = response.Value & 0xffff; + stubManager.Write("\n\nFPGA Reg. Read (FPGA Base, Addr, Data): ("); + stubManager.WriteHex(Fpga,4); + stubManager.Write(", "); + stubManager.WriteHex(Addr,4); + stubManager.Write(", "); + stubManager.WriteHex(response.Value,4); + stubManager.Write(")"); + response.Value = 0; + + return response; +} + +int Fpga_Write_Reg(Int32 Fpga, Int32 Addr, Int32 Data) +{ + var respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + Addr, Data); + return 1; +} + +int Motor_HighZ(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) +{ + + Fpga_Write_Reg(FPGA1, HighAdr, MOTORDRIVER_HIGHZ_COMMAND_MSB); + Fpga_Write_Reg(FPGA1, LowAdr, MOTORDRIVER_HIGHZ_COMMAND_LSB); + + return 1; +} + +int Motor_Run(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 Speed, Int32 Direction) +{ + + var RunCmdHigh = ( ((MOTORDRIVER_RUN_COMMAND_MSB >> 8) + (Direction & 0x1)) << 8 ) + ( (Speed & 0x0fffff) >> 16); + var RunCmdLow = (Speed & 0xffff); + + Fpga_Write_Reg(FPGA1, HighAdr, RunCmdHigh); + Fpga_Write_Reg(FPGA1, LowAdr, RunCmdLow); + + return 1; +} + +int Motor_Move(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 NumOfSteps, Int32 Direction) +{ + + var MoveCmdHigh = ( ((MOTORDRIVER_MOVE_COMMAND_MSB >> 8) + (Direction & 0x1)) << 8 ) + ( (NumOfSteps & 0x3fffff) >> 16); + var MoveCmdLow = (NumOfSteps & 0xffff); + + Fpga_Write_Reg(FPGA1, HighAdr, MoveCmdHigh); + Fpga_Write_Reg(FPGA1, LowAdr, MoveCmdLow); + + return 1; +} + +int Motor_Move_Loop(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 NumOfSteps, Int32 Direction, Int32 NumOfLoops) +{ + + for (int i = 0; i < NumOfLoops; i++) + { + Motor_Move(Fpga, HighAdr, LowAdr, NumOfSteps, Direction); + Thread.Sleep(1000); + Motor_Move(Fpga, HighAdr, LowAdr, NumOfSteps, Direction^0x1); + Thread.Sleep(1000); + } + return 1; + +} + +int Motor_ReadCfg(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) +{ + + Fpga_Write_Reg(Fpga, HighAdr, MOTORDRIVER_RDCFG_COMMAND_MSB); + Fpga_Write_Reg(Fpga, LowAdr, MOTORDRIVER_RDCFG_COMMAND_LSB); + Fpga_Read_Reg(Fpga, HighAdr+4); + Fpga_Read_Reg(Fpga, LowAdr+4); + + return 1; +} + + +public void OnExecute(StubManager stubManager) +{ + Motor_HighZ(FPGA1, MOTO_SCREW_TX1, MOTO_SCREW_TX0); + //Motor_HighZ(FPGA1, MOTO_LLOADING_TX1, MOTO_LLOADING_TX0); + //Motor_HighZ(FPGA1, MOTO_LDANCER1_TX1, MOTO_LDANCER1_TX0); + //Motor_HighZ(FPGA1, MOTO_LDANCER2_TX1, MOTO_LDANCER2_TX0); + //Motor_HighZ(FPGA1, MOTO_LPIVOT1_TX1, MOTO_LPIVOT1_TX0); + + Motor_ReadCfg(FPGA1, MOTO_SCREW_TX1, MOTO_SCREW_TX0); + //Motor_ReadCfg(FPGA1, MOTO_LLOADING_TX1, MOTO_LLOADING_TX0); + //Motor_ReadCfg(FPGA1, MOTO_LDANCER1_TX1, MOTO_LDANCER1_TX0); + //Motor_ReadCfg(FPGA1, MOTO_LDANCER2_TX1, MOTO_LDANCER2_TX0); + //Motor_ReadCfg(FPGA1, MOTO_LPIVOT1_TX1, MOTO_LPIVOT1_TX0); + + + Motor_Run(FPGA1, MOTO_SCREW_TX1, MOTO_SCREW_TX0, 800, 0x1); + Thread.Sleep(10000); + Motor_HighZ(FPGA1, MOTO_SCREW_TX1, MOTO_SCREW_TX0); +/* + Motor_Move_Loop(FPGA1, MOTO_LLOADING_TX1, MOTO_LLOADING_TX0, 0x3200, 0x1, 4); + Motor_HighZ(FPGA1, MOTO_LLOADING_TX1, MOTO_LLOADING_TX0); + + Motor_Move_Loop(FPGA1, MOTO_LDANCER1_TX1, MOTO_LDANCER1_TX0, 0x3200, 0x1, 4); + Motor_HighZ(FPGA1, MOTO_LDANCER1_TX1, MOTO_LDANCER1_TX0); + +// Motor_Move_Loop(FPGA1, MOTO_LDANCER2_TX1, MOTO_LDANCER2_TX0, 0x3200, 0x1, 4); +// Motor_HighZ(FPGA1, MOTO_LDANCER2_TX1, MOTO_LDANCER2_TX0); + + Motor_Move_Loop(FPGA1, MOTO_LPIVOT1_TX1, MOTO_LPIVOT1_TX0, 0x3200, 0x1, 4); + Motor_HighZ(FPGA1, MOTO_LPIVOT1_TX1, MOTO_LPIVOT1_TX0); + +*/ +} + +/* Script outputs motor driver chip config register +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0226, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0224, #8800) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0236, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0234, #8800) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02C6, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02C4, #8800) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02D6, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02D4, #8800) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0306, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0304, #8800) + +*/
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/set pos.cs b/Software/Stubs Collection/stubs/set pos.cs new file mode 100644 index 000000000..cd5a6a006 --- /dev/null +++ b/Software/Stubs Collection/stubs/set pos.cs @@ -0,0 +1,47 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + +// Request ---- +// UInt32 : MotorID +// UInt32 : MicroSteps +// Boolean : SetMicroSteps +// UInt32 : ACC +// Boolean : SetACC +// UInt32 : DEC +// Boolean : SetDec +// UInt32 : MaxSpeed +// Boolean : SetMaxSpeed + +// Response ---- +// UInt32 : MotorID +// UInt32 : Status +stubManager.Run<StubMotorInitResponse>("StubMotorInitRequest" ,0, 0, false, 0, false, 0, false, 0, false);// Request ---- +// UInt32 : MotorID +// Boolean : Direction +// UInt32 : Position + +// Response ---- +// UInt32 : MotorID +// UInt32 : Position +// UInt32 : StatusReg +// Boolean : Direction +// UInt32 : MotStatus +// Boolean : STEPLOSSA +// Boolean : STEPLOSSB +stubManager.Run<StubMotorMovResponse>("StubMotorMovRequest" ,0, false, 10000); + + +} + diff --git a/Software/Stubs Collection/stubs/stall_detection.cs b/Software/Stubs Collection/stubs/stall_detection.cs new file mode 100644 index 000000000..8dff1517a --- /dev/null +++ b/Software/Stubs Collection/stubs/stall_detection.cs @@ -0,0 +1,38 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // UInt32 : MotorID + // UInt32 : MicroSteps + // Boolean : SetMicroSteps + // UInt32 : ACC + // Boolean : SetACC + // UInt32 : DEC + // Boolean : SetDec + // UInt32 : MaxSpeed + // Boolean : SetMaxSpeed + stubManager.Run("StubMotorInitRequest" ,11, 1, false, 0, false, 0, false, 1100, true); + // UInt32 : MotorID + // Boolean : Direction + // Double : Speed + stubManager.Run("StubMotorRunRequest" ,11, true, 1000); + // UInt32 : MotorID + // Boolean : ClearStatus + + for (int i = 0; i < 10; i++) + { + Thread.Sleep(1000); + stubManager.Run("StubMotorStatusRequest" ,33, true); + } + stubManager.Run("StubMotorStopRequest" ,111, 0); // 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop +} + diff --git a/Software/Stubs Collection/stubs/stubs.zip b/Software/Stubs Collection/stubs/stubs.zip Binary files differnew file mode 100644 index 000000000..9b8a98765 --- /dev/null +++ b/Software/Stubs Collection/stubs/stubs.zip diff --git a/Software/Stubs Collection/stubs/system advanced test.msg b/Software/Stubs Collection/stubs/system advanced test.msg Binary files differnew file mode 100644 index 000000000..fc5098584 --- /dev/null +++ b/Software/Stubs Collection/stubs/system advanced test.msg diff --git a/Software/Stubs Collection/stubs/tango_green_led_off.cs b/Software/Stubs Collection/stubs/tango_green_led_off.cs new file mode 100644 index 000000000..119493d75 --- /dev/null +++ b/Software/Stubs Collection/stubs/tango_green_led_off.cs @@ -0,0 +1,17 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubGPIOWriteBitRequest" ,"N", 1, false);//Green + //stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, false);//Red +} + diff --git a/Software/Stubs Collection/stubs/tango_green_led_on.cs b/Software/Stubs Collection/stubs/tango_green_led_on.cs new file mode 100644 index 000000000..edfde6991 --- /dev/null +++ b/Software/Stubs Collection/stubs/tango_green_led_on.cs @@ -0,0 +1,17 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubGPIOWriteBitRequest" ,"N", 1, true);//Green + //stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//Red +} + diff --git a/Software/Stubs Collection/stubs/temp screw.cs b/Software/Stubs Collection/stubs/temp screw.cs new file mode 100644 index 000000000..704bf73e3 --- /dev/null +++ b/Software/Stubs Collection/stubs/temp screw.cs @@ -0,0 +1,18 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + var response = stubManager.Run<StubCartridgeReadResponse>("StubCartridgeReadRequest" ,0); + +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/temp.cs b/Software/Stubs Collection/stubs/temp.cs new file mode 100644 index 000000000..20a7c1cd1 --- /dev/null +++ b/Software/Stubs Collection/stubs/temp.cs @@ -0,0 +1,42 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + // UInt32 : MotorID + // UInt32 : MicroSteps + // Boolean : SetMicroSteps + // UInt32 : ACC + // Boolean : SetACC + // UInt32 : DEC + // Boolean : SetDec + // UInt32 : MaxSpeed + // Boolean : SetMaxSpeed + // + stubManager.Run("StubMotorInitRequest" ,11, 0, true, 2000, true, 2000, true, 5000, true); //Init - use embedded hardcodded values + // UInt32 : MotorID + // Boolean : Direction + // Double : Speed + stubManager.Run("StubMotorRunRequest" ,0, true, 1000); + + // UInt32 : MotorID + // Boolean : Direction + // UInt32 : Position + //stubManager.Run("StubMotorMovRequest" ,1, true, 5000); + + // UInt32 : MotorID + //stubManager.Run("StubMotorPositionRequest" ,2); + + // UInt32 : MotorID + // Boolean : ClearStatus + //stubManager.Run("StubMotorStatusRequest" ,3, true); +} + diff --git a/Software/Stubs Collection/stubs/test speed step per sec.cs b/Software/Stubs Collection/stubs/test speed step per sec.cs new file mode 100644 index 000000000..9b9a378d0 --- /dev/null +++ b/Software/Stubs Collection/stubs/test speed step per sec.cs @@ -0,0 +1,49 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + + // UInt32 : MotorID + // UInt32 : MicroSteps + // Boolean : SetMicroSteps + // UInt32 : ACC + // Boolean : SetACC + // UInt32 : DEC + // Boolean : SetDec + // UInt32 : MaxSpeed + // Boolean : SetMaxSpeed + stubManager.Run("StubMotorInitRequest" ,11, 3, true, 100, true, 100, true, 1000, true); //Init - use embedded hardcodded values + //stubManager.Run("StubMotorInitRequest" ,11, 3, false, 138, false, 138, false, 990, false); //Init - use embedded hardcodded values + + Thread.Sleep(1000); + // UInt32 : MotorID + // Boolean : Direction + // Double : Speed + stubManager.Run("StubMotorRunRequest" ,22, true, 2000); //step/sec + + for (int i = 0; i < 5; i++) + { + + Thread.Sleep(1000); + // UInt32 : MotorID + stubManager.Run("StubMotorSpeedRequest" ,33); + //stubManager.Run("StubMotorStatusRequest" ,55, true); + + } + + Thread.Sleep(1000); + // UInt32 : MotorID + // UInt32 : StopCMD + stubManager.Run("StubMotorStopRequest" ,44, 0); // 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop + +} + diff --git a/Software/Stubs Collection/stubs/test.cs b/Software/Stubs Collection/stubs/test.cs new file mode 100644 index 000000000..cafc06b12 --- /dev/null +++ b/Software/Stubs Collection/stubs/test.cs @@ -0,0 +1,28 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + for (int i = 0; i < 15; i++) + { + var response = stubManager.Run<CalculateResponse>("calculate", 1, i); + + if (response.Sum == 10) + { + stubManager.WriteLine("OK!"); + } + else + { + stubManager.WriteLine(response.Sum); + } + } +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/test_busy_0n_Acceleration.cs b/Software/Stubs Collection/stubs/test_busy_0n_Acceleration.cs new file mode 100644 index 000000000..c6661da29 --- /dev/null +++ b/Software/Stubs Collection/stubs/test_busy_0n_Acceleration.cs @@ -0,0 +1,45 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.Stubs.UI; + +//Expected BUSY = FALSH ON ACC OR DEC + +public void OnExecute(StubManager stubManager) +{ + + // UInt32 : MotorID + // UInt32 : MicroSteps + // Boolean : SetMicroSteps + // UInt32 : ACC + // Boolean : SetACC + // UInt32 : DEC + // Boolean : SetDec + // UInt32 : MaxSpeed + // Boolean : SetMaxSpeed + stubManager.Run("StubMotorInitRequest" ,11, 0, false, 0, false, 0, false, 0, false); //Init - use embedded hardcodded values + + Thread.Sleep(1000); + // UInt32 : MotorID + // Boolean : Direction + // Double : Speed + stubManager.Run("StubMotorRunRequest" ,22, true, 1000); //step/sec + + + //Thread.Sleep(1000); + // UInt32 : MotorID + stubManager.Run("StubMotorSpeedRequest" ,33); + stubManager.Run("StubMotorStatusRequest" ,55, true); + + Thread.Sleep(1000); + // UInt32 : MotorID + // UInt32 : StopCMD + stubManager.Run("StubMotorStopRequest" ,44, 0); // 0 - SoftHiZ / 1 - HardHiZ / 2 - SoftStop / 3 - HardStop + stubManager.Run("StubMotorStatusRequest" ,55, true); +} diff --git a/Software/Stubs Collection/stubs/turn OFF all the heaters.cs b/Software/Stubs Collection/stubs/turn OFF all the heaters.cs new file mode 100644 index 000000000..95e4341a5 --- /dev/null +++ b/Software/Stubs Collection/stubs/turn OFF all the heaters.cs @@ -0,0 +1,16 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, 0x0000); // turn OFF all the heaters +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/valve3way.cs b/Software/Stubs Collection/stubs/valve3way.cs new file mode 100644 index 000000000..760cd346d --- /dev/null +++ b/Software/Stubs Collection/stubs/valve3way.cs @@ -0,0 +1,32 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +public void OnExecute(StubManager stubManager) +{ + +//bool flag = true; //for (int i=0;i<8;i++) + //{ + // Request ---- + // UInt32 : ValveId + // UInt32 : Inkflow + // Boolean : ValveOn + + // Response ---- + // String : Status + // UInt32 : StatusWord + var response = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 0, true); + Thread.Sleep(5000); + + var response1 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 0, false); +//Thread.Sleep(5000); + //} +}
\ No newline at end of file diff --git a/Software/Stubs Collection/stubs/winder.cs b/Software/Stubs Collection/stubs/winder.cs new file mode 100644 index 000000000..9c38bc3bf --- /dev/null +++ b/Software/Stubs Collection/stubs/winder.cs @@ -0,0 +1,197 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs.UI; + +const Int32 FPGA1 = 0x60000000; +const Int32 FPGA2 = 0x60000400; +const Int32 FPGA3 = 0x60000800; +const Int32 TEST_REG = 0x3f0; + +const Int32 MOTO_SCREW_TX0 = 0x0280; +const Int32 MOTO_SCREW_TX1 = 0x0282; +const Int32 MOTO_SCREW_RX0 = 0x0284; +const Int32 MOTO_SCREW_RX1 = 0x0286; + + +const Int32 MOTO_WINDER_TX0 = 0x290; +const Int32 MOTO_WINDER_TX1 = 0x292; +const Int32 MOTO_WINDER_RX0 = 0x294; +const Int32 MOTO_WINDER_RX1 = 0x296; + +const Int32 MOTO_LDRIVING_TX1 = 0x0222; +const Int32 MOTO_LDRIVING_TX0 = 0x0220; +const Int32 MOTO_LDRIVING_RX1 = 0x0226; +const Int32 MOTO_LDRIVING_RX0 = 0x0224; + +const Int32 MOTO_LLOADING_TX1 = 0x0232; +const Int32 MOTO_LLOADING_TX0 = 0x0230; + +const Int32 MOTO_LDANCER1_TX1 = 0x02c2; +const Int32 MOTO_LDANCER1_TX0 = 0x02c0; + +const Int32 MOTO_LDANCER2_TX1 = 0x02d2; +const Int32 MOTO_LDANCER2_TX0 = 0x02d0; +const Int32 MOTO_LDANCER2_A1_AMT_OF_WORDS = 0x02d8; + +const Int32 MOTO_LPIVOT1_TX1 = 0x0302; +const Int32 MOTO_LPIVOT1_TX0 = 0x0300; +const Int32 MOTO_LPIVOT1_A1_AMT_OF_WORDS = 0x0308; + +const Int32 MOTORDRIVER_HIGHZ_COMMAND_MSB = 0xa800; +const Int32 MOTORDRIVER_HIGHZ_COMMAND_LSB = 0x0000; + +const Int32 MOTORDRIVER_RUN_COMMAND_MSB = 0x5000; +const Int32 MOTORDRIVER_RUN_COMMAND_LSB = 0x0000; + +const Int32 MOTORDRIVER_MOVE_COMMAND_MSB = 0x4000; +const Int32 MOTORDRIVER_MOVE_COMMAND_LSB = 0x0000; + +const Int32 MOTORDRIVER_RDCFG_COMMAND_MSB = 0x3800; +const Int32 MOTORDRIVER_RDCFG_COMMAND_LSB = 0x0000; + + +StubFpgaReadRegResponse Fpga_Read_Reg(Int32 Fpga, Int32 Addr) +{ + var response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" , Fpga + Addr); + response.Value = response.Value & 0xffff; + stubManager.Write("\n\nFPGA Reg. Read (FPGA Base, Addr, Data): ("); + stubManager.WriteHex(Fpga,4); + stubManager.Write(", "); + stubManager.WriteHex(Addr,4); + stubManager.Write(", "); + stubManager.WriteHex(response.Value,4); + stubManager.Write(")"); + response.Value = 0; + + return response; +} + +int Fpga_Write_Reg(Int32 Fpga, Int32 Addr, Int32 Data) +{ + var respons1 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + Addr, Data); + return 1; +} + +int Motor_HighZ(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) +{ + + Fpga_Write_Reg(FPGA1, HighAdr, MOTORDRIVER_HIGHZ_COMMAND_MSB); + Fpga_Write_Reg(FPGA1, LowAdr, MOTORDRIVER_HIGHZ_COMMAND_LSB); + + return 1; +} + +int Motor_Run(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 Speed, Int32 Direction) +{ + + var RunCmdHigh = ( ((MOTORDRIVER_RUN_COMMAND_MSB >> 8) + (Direction & 0x1)) << 8 ) + ( (Speed & 0x0fffff) >> 16); + var RunCmdLow = (Speed & 0xffff); + + Fpga_Write_Reg(FPGA1, HighAdr, RunCmdHigh); + Fpga_Write_Reg(FPGA1, LowAdr, RunCmdLow); + + return 1; +} + +int Motor_Move(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 NumOfSteps, Int32 Direction) +{ + + var MoveCmdHigh = ( ((MOTORDRIVER_MOVE_COMMAND_MSB >> 8) + (Direction & 0x1)) << 8 ) + ( (NumOfSteps & 0x3fffff) >> 16); + var MoveCmdLow = (NumOfSteps & 0xffff); + + Fpga_Write_Reg(FPGA1, HighAdr, MoveCmdHigh); + Fpga_Write_Reg(FPGA1, LowAdr, MoveCmdLow); + + return 1; +} + +int Motor_Move_Loop(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 NumOfSteps, Int32 Direction, Int32 NumOfLoops) +{ + + for (int i = 0; i < NumOfLoops; i++) + { + Motor_Move(Fpga, HighAdr, LowAdr, NumOfSteps, Direction); + Thread.Sleep(1000); + Motor_Move(Fpga, HighAdr, LowAdr, NumOfSteps, Direction^0x1); + Thread.Sleep(1000); + } + return 1; + +} + +int Motor_ReadCfg(Int32 Fpga, Int32 HighAdr, Int32 LowAdr) +{ + + Fpga_Write_Reg(Fpga, HighAdr, MOTORDRIVER_RDCFG_COMMAND_MSB); + Fpga_Write_Reg(Fpga, LowAdr, MOTORDRIVER_RDCFG_COMMAND_LSB); + Fpga_Read_Reg(Fpga, HighAdr+4); + Fpga_Read_Reg(Fpga, LowAdr+4); + + return 1; +} + + +public void OnExecute(StubManager stubManager) +{ + Motor_HighZ(FPGA1, MOTO_WINDER_TX1, MOTO_WINDER_TX0); + //Motor_HighZ(FPGA1, MOTO_LLOADING_TX1, MOTO_LLOADING_TX0); + //Motor_HighZ(FPGA1, MOTO_LDANCER1_TX1, MOTO_LDANCER1_TX0); + //Motor_HighZ(FPGA1, MOTO_LDANCER2_TX1, MOTO_LDANCER2_TX0); + //Motor_HighZ(FPGA1, MOTO_LPIVOT1_TX1, MOTO_LPIVOT1_TX0); + + Motor_ReadCfg(FPGA1, MOTO_WINDER_TX1, MOTO_WINDER_TX0); + //Motor_ReadCfg(FPGA1, MOTO_LLOADING_TX1, MOTO_LLOADING_TX0); + //Motor_ReadCfg(FPGA1, MOTO_LDANCER1_TX1, MOTO_LDANCER1_TX0); + //Motor_ReadCfg(FPGA1, MOTO_LDANCER2_TX1, MOTO_LDANCER2_TX0); + //Motor_ReadCfg(FPGA1, MOTO_LPIVOT1_TX1, MOTO_LPIVOT1_TX0); + + + Motor_Run(FPGA1, MOTO_WINDER_TX1, MOTO_WINDER_TX0, 800, 0x1); + //Thread.Sleep(30000); + //Motor_HighZ(FPGA1, MOTO_SCREW_TX1, MOTO_SCREW_TX0); +/* + Motor_Move_Loop(FPGA1, MOTO_LLOADING_TX1, MOTO_LLOADING_TX0, 0x3200, 0x1, 4); + Motor_HighZ(FPGA1, MOTO_LLOADING_TX1, MOTO_LLOADING_TX0); + + Motor_Move_Loop(FPGA1, MOTO_LDANCER1_TX1, MOTO_LDANCER1_TX0, 0x3200, 0x1, 4); + Motor_HighZ(FPGA1, MOTO_LDANCER1_TX1, MOTO_LDANCER1_TX0); + +// Motor_Move_Loop(FPGA1, MOTO_LDANCER2_TX1, MOTO_LDANCER2_TX0, 0x3200, 0x1, 4); +// Motor_HighZ(FPGA1, MOTO_LDANCER2_TX1, MOTO_LDANCER2_TX0); + + Motor_Move_Loop(FPGA1, MOTO_LPIVOT1_TX1, MOTO_LPIVOT1_TX0, 0x3200, 0x1, 4); + Motor_HighZ(FPGA1, MOTO_LPIVOT1_TX1, MOTO_LPIVOT1_TX0); + +*/ +} + +/* Script outputs motor driver chip config register +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0226, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0224, #8800) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0236, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0234, #8800) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02C6, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02C4, #8800) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02D6, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02D4, #8800) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0306, #002E) + +FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0304, #8800) + +*/
\ No newline at end of file |
