60 likes | 78 Views
Lab #4 Device & Record Support. Acromag AVME9440-I-L. Digital I/O board 16 binary output channels with LED indicators 16 binary input channels with LED indicators Interrupt support on input channels 0-7 Look through the board User’s Manual
E N D
Acromag AVME9440-I-L • Digital I/O board • 16 binary output channels with LED indicators • 16 binary input channels with LED indicators • Interrupt support on input channels 0-7 • Look through the board User’s Manual • Understand the facilities it provides and how to use them • Set jumpers for • Base Address • Address Modifier • Interrupt Level (later exercises only)
Binary output • Create device support for the Binary Output record • Copy ~studnt0/ioc/example/exampleApp/src/devBoTemplate.c to a new file in your working area • Implement the necessary routines and compile this • Check the Record Reference Manual for interface requirements • Make device addresses configurable at run-time • How can you check whether an Acromag board is at that address? • Create a suitable device entry in a new .dbd file • Build the application’s global .dbd file • Create a database with record instances using your support • Add suitable entries to the IOC startup script • Boot and test it!
Multi-bit binary output • Create support for the Multi-Bit Binary Output record • How does the interface for this differ from the bo record? • Check the mbbo entry in the Record Reference Manual • Copy the devMbboTemplate.c file, or use your bo support • Can you implement mbboDirect support too?
Binary input • Create support for the Binary Input record • The file devBiTemplate.c is available for copying • NB: Only one group can test this at once • Add I/O Interrupt capability • A change of state of the input signal causes the record to be processed when SCAN=“I/O Intr” • Several records may address the same input channel • Make interrupt vectors configurable at run-time • Create support for the Multi-Bit Binary Input record • The file devMbbiTemplate.c is available for copying • How do you handle interrupts for both bi and mbbi records together?
Record support • Create a new record type • Copy the existing xxxRecord.c and xxxRecord.dbd files • Edit the .dbd file and change the field definitions • Change the source code to implement the new functionality • Create soft-record device support for the new record type • Copy the existing devXxxSoft.c file