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; /*HEAD CARD I/O Slave address 0x40 / 0x42 / 0x44 / 0x46 ------------------------- | Byte | WR | RD | CFG | ------------------------- | Low | 02 | 00 | 06 | | High | 03 | 01 | 07 | ------------------------- Example (42 Slave Address, 03 Write High Byte, D8 Set value (NA on read)) stubManager.Run("ProgressRequest" ,0x0EAD, 0x4203D8); */ public void OnExecute(StubManager stubManager) { //ZN_Latch_RST off var response = stubManager.Run("ProgressRequest" ,0x0EAD, 0x4203D8); stubManager.WriteLineHex(response.Progress,2); //Turn ON mixer var response1 = stubManager.Run("ProgressRequest" ,0x0EAD, 0x420210); stubManager.WriteLineHex(response1.Progress,2); //Turn ON 12 (0..7) var response4 = stubManager.Run("ProgressRequest" ,0x0EAD, 0x4002FF); stubManager.WriteLineHex(response4.Progress,2); //Turn ON 12 (8..11) var response5 = stubManager.Run("ProgressRequest" ,0x0EAD, 0x40030F); stubManager.WriteLineHex(response5.Progress,2); //ZN_Latch_RST ON var response2 = stubManager.Run("ProgressRequest" ,0x0EAD, 0x4203F8); stubManager.WriteLineHex(response2.Progress,2); Thread.Sleep(5000); //Turn OFF mixer var response3 = stubManager.Run("ProgressRequest" ,0x0EAD, 0x420200); stubManager.WriteLineHex(response3.Progress,2); //Turn OFF 12 (0..7) var response6 = stubManager.Run("ProgressRequest" ,0x0EAD, 0x400200); stubManager.WriteLineHex(response6.Progress,2); //Turn OFF 12 (8..11) var response7 = stubManager.Run("ProgressRequest" ,0x0EAD, 0x400300); stubManager.WriteLineHex(response7.Progress,2); }