SENSORAY | p. 503.684.8005 | email: [email protected] | www.SENSORAY.com7313 SW Tech Center Drive | Portland, OR 97223Designed and manufactured in th
Sensoray 24xx Programming Guide6Sessions and Transactionsend of a sequence of transactions, but only if it doesn’t need to know exactly where in the s
Sensoray 24xx Programming Guide7Sessions and TransactionsERR_TIMEOUTTimed out waiting for a reply from the I/O module.Non-fatal (recoverable) Run-time
Sensoray 24xx Programming Guide8Module-Independent FunctionsChapter 5: Module-Independent Functions5.1 OverviewThe API functions discussed in this c
Sensoray 24xx Programming Guide9Module-Independent Functions5.3 Session Initialization and Shutdown5.3.1 s24xx_SessionOpen()Function: Open a communi
Sensoray 24xx Programming Guide10Module-Independent Functions5.4 Error Functions5.4.1 s24xx_ErrorText()Function: Return an error description string.
Sensoray 24xx Programming Guide11Module-Independent Functions5.5 Status and Control5.5.1 s24xx_SetTimeout()Function: Configure a session’s network w
Sensoray 24xx Programming Guide12Module-Independent Functionsu32 err = ERR_NONE;if ( !s24xx_ResetIo( sess, &err ) ) printf( "Error: %s\n&q
Sensoray 24xx Programming Guide13Module-Independent Functions5.6.2 s24xx_WriteTimestamp()Function: Set module’s system time.Prototype:BOOL s24xx_Writ
Sensoray 24xx Programming Guide14Model 2410 Digital I/O ModuleChapter 6: Model 2410 Digital I/O Module6.1 OverviewThe API functions in this chapter
Sensoray 24xx Programming Guide15Model 2410 Digital I/O Module6.2.2 s2410_ReadDin()Function: Read the debounced physical states of all DIO channels.P
Sensoray 24xx Programming Guide16Model 2410 Digital I/O Moduleif ( !s2410_ReadDout( sess, &err, states ) ) printf( "Error: %s\n", s24
Sensoray 24xx Programming Guide17Model 2410 Digital I/O Module6.2.6 s2410_WritePwm()Function: Program the PWM ratio for one DIO channel.Prototype:BOO
Sensoray 24xx Programming Guide18Model 2410 Digital I/O ModuleExample:// Set LED brightness to 1 (dim, but visible).u32 err = ERR_NONE;if ( !s2410_Set
Sensoray 24xx Programming Guide19Model 2410 Digital I/O Moduleu16 flags[3];if ( !s2410_ReadCapFlags( sess, &err, flags ) ) printf( "Error:
Sensoray 24xx Programming Guide20Model 2410 Digital I/O ModuleDepending on the message type, additional information may be passed to the callback thro
Sensoray 24xx Programming Guide21Model 2410 Digital I/O Module case CAPMSG_ONESHOT: printf( "one-shot cap enabled: %04x %04x %04x\n&quo
Sensoray 24xx Programming Guide22Model 2410 Digital I/O Module6.4.5 s2410_WriteCapPolarity()Function: Select the polarities of events to be captured
Sensoray 24xx Programming Guide23Model 2410 Digital I/O ModuleExample:// Enable continuous capture on channels 0, 1, and 47.u32 err = ERR_NONE;u16 fla
Sensoray 24xx Programming Guide24Model 2410 Digital I/O ModuleNotes: This function disables event capturing on an arbitrary set of digital input chann
Sensoray 24xx Programming Guide25Model 2426 Multi-Function I/O ModuleChapter 7: Model 2426 Multi-Function I/O Module7.1 OverviewThe API functions in
Sensoray 24xx Programming GuideiTable of ContentsTable of ContentsIntroduction1.1 Scope ...
Sensoray 24xx Programming Guide26Model 2426 Multi-Function I/O Module7.2.2 s2426_ReadDin()Function: Read the debounced physical states of the eight d
Sensoray 24xx Programming Guide27Model 2426 Multi-Function I/O Module7.2.4 s2426_SetDoutMode()Function: Program the operating mode of one digital out
Sensoray 24xx Programming Guide28Model 2426 Multi-Function I/O Module7.2.6 s2426_WritePwm()Function: Program the PWM ratio for one digital output cha
Sensoray 24xx Programming Guide29Model 2426 Multi-Function I/O Module7.3.2 s2426_ReadAout()Function: Read the programmed analog output level.Prototyp
Sensoray 24xx Programming Guide30Model 2426 Multi-Function I/O Module7.4 Encoder Functions7.4.1 s2426_ReadEncoderCounts()Function: Read the encoder
Sensoray 24xx Programming Guide31Model 2426 Multi-Function I/O ModuleExample:// Set count rate to 4x the encoder frequency, with no preload upon index
Sensoray 24xx Programming Guide32Model 2426 Multi-Function I/O Module7.5 Comport Functions7.5.1 s2426_ComportOpen()Function: Configure the comport a
Sensoray 24xx Programming Guide33Model 2426 Multi-Function I/O Module7.5.3 s2426_ComportRead()Function: Fetch data and line state events from the com
Sensoray 24xx Programming Guide34Model 2426 Multi-Function I/O Module7.5.4 s2426_ComportWrite()Function: Enqueue data for transmission on the comport
Sensoray 24xx Programming Guide35Model 2426 Multi-Function I/O Module7.5.5 s2426_ComportIoctl()Function: Execute an I/O control operation on the comp
Sensoray 24xx Programming GuideiiTable of ContentsTable of Contents7.3 Analog I/O Functions ... 287.3.1 s2426_WriteAout()
Sensoray 24xx Programming Guide1IntroductionChapter 1: Introduction1.1 ScopeThis document describes the application programming interface (API) for
Sensoray 24xx Programming Guide2InstallationChapter 2: Installation2.1 Executable Software ComponentsThe middleware is dependent on a network API, s
Sensoray 24xx Programming Guide3FundamentalsChapter 3: Fundamentals3.1 Board Addressing3.1.1 Board HandlesEvery Model 24xx I/O module is assigned a
Sensoray 24xx Programming Guide4Fundamentalsaddress you chose earlier. If necessary, also enter a new netmask and gateway address. Click the Submit bu
Sensoray 24xx Programming Guide5Sessions and TransactionsChapter 4: Sessions and Transactions4.1 OverviewMost API functions involve transactions bet
Commentaires sur ces manuels