Model 2600 FamilyProgramming GuideAugust 21, 2008Sensoray Co., Inc.7313 SW Tech Center Dr., Tigard, Oregon 97223voice: 503.684.8005, fax: 503.684.8164
Sensoray 2600 Programming Guide 6 Initialization and Status Functionsby S26_DriverOpen(), however, the application should not call S26_DriverClose().
Sensoray 2600 Programming Guide 7 Initialization and Status Functionschar MMAdrs[] = "10.10.10.1";u32 errflags = S26_BoardOpen( 0, 0, MMAdrs
Sensoray 2600 Programming Guide 8 Initialization and Status FunctionsReturns: u32 value that indicates whether the reset operation was successful. Re
Sensoray 2600 Programming Guide 9 Initialization and Status FunctionsPrototype: u32 S26_RegisterAllIoms(u32 hbd,u32 msec,u16 *nIoms, u16 *types, u8 *s
Sensoray 2600 Programming Guide 10 Initialization and Status Functions if ( ( faults = S26_BoardOpen( 0, 0, MMAdrs ) ) != 0 ) { //
Sensoray 2600 Programming Guide 11 Initialization and Status Functions // // ... Do all I/O operations and run the application’s main function
Sensoray 2600 Programming Guide 12 TransactionsChapter 5: Transactions5.1 OverviewThe majority of middleware functions are associated with gateway a
Sensoray 2600 Programming Guide 13 Transactions5.2.1 Thread SafetyAll of the gateway transaction functions are thread safe, and it is permissible for
Sensoray 2600 Programming Guide 14 TransactionsTransaction error codes have the following meanings:In the above table, the “Com” column indicates whet
Sensoray 2600 Programming Guide 15 Transactions5.5.1 Gateway Error PropagationWhen any gateway transaction error has been detected, construction of t
Sensoray 2600 Programming GuideiTable of ContentsTable of ContentsIntroduction1.1 Scope... 1
Sensoray 2600 Programming Guide 16 Transactionspacket sizes, but also on how many other gateway transactions are already in progress. “Simultaneous”
Sensoray 2600 Programming Guide 17 Gateway Transaction ControlChapter 6: Gateway Transaction Control6.1 OverviewThe functions in this section are us
Sensoray 2600 Programming Guide 18 Gateway Transaction Controltime-out interval has elapsed, whichever occurs first. When it is received, the respons
Sensoray 2600 Programming Guide 19 Gateway Transaction ControlPrototype: u32 S26_SchedExecuteStart( XACT x );Returns: Error code as described in secti
Sensoray 2600 Programming Guide 20 Gateway Transaction ControlPrototype: u32 S26_SchedExecuteFinish( XACT x, u8 *IomStatus );Returns: Error code as de
Sensoray 2600 Programming Guide 21 Gateway Action SchedulingChapter 7: Gateway Action Scheduling7.1 OverviewThis chapter details all of the function
Sensoray 2600 Programming Guide 22 Gateway Action Scheduling u8 states; // Buffer that will receive SSR states. S
Sensoray 2600 Programming Guide 23 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was su
Sensoray 2600 Programming Guide 24 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was su
Sensoray 2600 Programming Guide 25 Gateway Action SchedulingPrototype: u32 S26_Sched2601_GetInterlocks( XACT x, u8 *LockFlags );Returns: Error code as
Sensoray 2600 Programming GuideiiTable of ContentsTable of Contents7.3 Model 2601 Gateway... 247.3.1 Type-Specific Error
Sensoray 2600 Programming Guide 26 Gateway Action Scheduling{ if ( flags & mask ) printf( "Module detected at IOM port %d\n",
Sensoray 2600 Programming Guide 27 Gateway Action Schedulingwill cause the corresponding channel to be programmed for the 100 millivolt measurement ra
Sensoray 2600 Programming Guide 28 Gateway Action SchedulingPrototype: u32 S26_Sched2608_SetTempUnits( XACT x, IOMPORT IomPort, int DegreesF );Returns
Sensoray 2600 Programming Guide 29 Gateway Action Schedulingvoid *x = S26_SchedOpen( 0, 1 );S26_Sched2608_GetCalData( x, 1, 0 );S26_Sched2608_GetAins(
Sensoray 2600 Programming Guide 30 Gateway Action SchedulingExample: // Get the analog output channel 2 setpoint from the 2608 at MM number 0, IOM por
Sensoray 2600 Programming Guide 31 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was su
Sensoray 2600 Programming Guide 32 Gateway Action SchedulingPrototype: u32 S26_Sched2608_SetAout( XACT x, IOMPORT IomPort, u8 chan, double volts );Ret
Sensoray 2600 Programming Guide 33 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was s
Sensoray 2600 Programming Guide 34 Gateway Action Scheduling7.5.3 S26_Sched2610_GetModes()Function: Schedules the fetching of the operating modes for
Sensoray 2600 Programming Guide 35 Gateway Action SchedulingPrototype: u32 S26_Sched2610_GetOutputs( XACT x, IOMPORT IomPort, u8 *states );Returns: Er
Sensoray 2600 Programming GuideiiiTable of ContentsTable of Contents7.10 Model 2653 Solid-State Relay IOM... 597.10.1 Type-Specific Errors...
Sensoray 2600 Programming Guide 36 Gateway Action SchedulingPrototype: u32 S26_Sched2610_SetModes( XACT x, IOMPORT IomPort, u8 *modes );Returns: Error
Sensoray 2600 Programming Guide 37 Gateway Action SchedulingPrototype: u32 S26_Sched2610_SetOutputs( XACT x, IOMPORT IomPort, u8 *states );Returns: Er
Sensoray 2600 Programming Guide 38 Gateway Action Scheduling7.6.1 Type-Specific ErrorsIn addition to the common IOM status bit flags (STATUS_RST and
Sensoray 2600 Programming Guide 39 Gateway Action SchedulingBenchmark: 0.8 ms.Notes: This function, as well as S26_Sched2612_SetVoltages(), should be
Sensoray 2600 Programming Guide 40 Gateway Action SchedulingPrototype: u32 S26_Sched2612_GetValues( XACT x, IOMPORT IomPort, s32 *values, u8 *tstamp )
Sensoray 2600 Programming Guide 41 Gateway Action SchedulingPrototype: u32 S26_2612_RegisterZero( u32 hbd, IOMPORT IomPort, u32 msec, u8 chan, u32 nsm
Sensoray 2600 Programming Guide 42 Gateway Action SchedulingA gauge load parameter, load, must be specified when this function is called. This value r
Sensoray 2600 Programming Guide 43 Gateway Action SchedulingBenchmark: << 0.1 ms (no network transactions used).Notes: This function converts th
Sensoray 2600 Programming Guide 44 Gateway Action SchedulingNotes: This function returns the scale calibration parameter from a previously calibrated
Sensoray 2600 Programming Guide 45 Gateway Action Schedulingmiddleware has been closed and reopened, this function can be called to restore the calibr
Sensoray 2600 Programming Guide 1 IntroductionChapter 1: Introduction1.1 ScopeThis document describes the contents and use of the distribution media
Sensoray 2600 Programming Guide 46 Gateway Action SchedulingExample: // Restore calibrations on the 2612 at MM number 0, IOM port 10, channel 2. S26_2
Sensoray 2600 Programming Guide 47 Gateway Action SchedulingPrototype: u32 S26_Sched2620_GetStatus( XACT x, IOMPORT IomPort, u8 chan, u16 *status );Th
Sensoray 2600 Programming Guide 48 Gateway Action Schedulingdone, however, if you have configured a channel so that it’s core is automatically transfe
Sensoray 2600 Programming Guide 49 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was su
Sensoray 2600 Programming Guide 50 Gateway Action SchedulingExample: // Configure counter 3 as a frequency counter on the 2620 at MM number 0, IOM por
Sensoray 2600 Programming Guide 51 Gateway Action SchedulingExample: // Configure counter 3 as a pulse generator on the 2620 at MM number 0, IOM port
Sensoray 2600 Programming Guide 52 Gateway Action SchedulingPulse width and gap times are determined by the values stored in the Preload registers. P
Sensoray 2600 Programming Guide 53 Gateway Action SchedulingThe mode value is a collection of bit flags:Returns: Error code as described in section 5.
Sensoray 2600 Programming Guide 54 Gateway Action Scheduling7.7.13 S26_Sched2620_SetPreload()Function: Schedules the programming of a preload registe
Sensoray 2600 Programming Guide 55 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was su
Sensoray 2600 Programming Guide 2 InstallationChapter 2: Installation2.1 Executable Software ComponentsBecause the middleware is dependent on a netw
Sensoray 2600 Programming Guide 56 Gateway Action SchedulingExample: // Program all relay driver states on the 2650 at MM number 0, IOM port 9.u8 stat
Sensoray 2600 Programming Guide 57 Gateway Action SchedulingPrototype: u32 S26_Sched2652_GetModes( XACT x, IOMPORT IomPort, u8 *modes );Returns: Error
Sensoray 2600 Programming Guide 58 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was su
Sensoray 2600 Programming Guide 59 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was su
Sensoray 2600 Programming Guide 60 Gateway Action SchedulingPrototype: u32 S26_Sched2653_GetInputs( XACT x, IOMPORT IomPort, u8 *states );Returns: Err
Sensoray 2600 Programming Guide 61 Gateway Action SchedulingPrototype: u32 S26_Sched2653_GetOutputs( XACT x, IOMPORT IomPort, u8 *states );Returns: Er
Sensoray 2600 Programming Guide 62 Gateway Action SchedulingPrototype: u32 S26_Sched2653_SetModes( XACT x, IOMPORT IomPort, u8 *modes );Returns: Error
Sensoray 2600 Programming Guide 63 Gateway Action SchedulingReturns: Error code as described in section 5.5. Zero is returned if the operation was su
Sensoray 2600 Programming Guide 64 Comport Transaction FunctionsChapter 8: Comport Transaction Functions8.1 OverviewThis section describes the middl
Sensoray 2600 Programming Guide 65 Comport Transaction FunctionsPrototype: u32 S26_ComSetMode(u32 hbd,u8 dev,u16 cdiv,u8 mode,u8 leds,u32 msec,u32 ret
Sensoray 2600 Programming Guide 3 Fundamentals of UsageChapter 3: Fundamentals of Usage3.1 Board Addressing3.1.1 MM HandlesEach Model 2601 board—wh
Sensoray 2600 Programming Guide 66 Comport Transaction FunctionsReturns: Error/status value, as described in section 8.1.1.Notes: Following a MM reset
Sensoray 2600 Programming Guide 67 Comport Transaction Functionscondition is detected on the comport’s receive line. The break character may be set t
Sensoray 2600 Programming Guide 68 Comport Transaction FunctionsPrototype: u32 S26_ComClose( HMM hbd, u8 LogDev, u32 msec, u32 retries );Returns: Erro
Sensoray 2600 Programming Guide 69 Comport Transaction FunctionsExample: // Send an ASCII string to COM1 on MM number 0. Note that the message size//
Sensoray 2600 Programming Guide 70 Comport Transaction Functions RcvBuf[BufLen] = 0; // Append null to end of string. printf( "%s
Sensoray 2600 Programming Guide 71 Comport Transaction Functionsif ( errstat & GWERRMASK ) printf( "COM1 error detected.\n" );else if
Sensoray 2600 Programming Guide 72 Comport Transaction Functions8.4.3 S26_ComClearFlags()Function: Resets all error flags belonging to a comport.Prot
Sensoray 2600 Programming Guide 73 Comport Transaction Functions // Received a bad character, so we must flush the receive buffer. printf( "
Sensoray 2600 Programming Guide 4 Fundamentals of Usage3.3.1 Data TypesData values passed to or received from library functions belong to a small set
Sensoray 2600 Programming Guide 5 Initialization and Status FunctionsChapter 4: Initialization and Status Functions4.1 OverviewThe functions describ
Kommentare zu diesen Handbüchern