EasyManua.ls Logo

IDEC OpenNet series

IDEC OpenNet series
427 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
26: LONWORKS INTERFACE MODULE
26-18 OPENNET CONTROLLER USERS MANUAL
Application Program Examples
This section describes application program examples for initializing the registers in the LONWORKS interface module,
writing receive data to data registers, and reading transmit data from data registers.
Initialization
Before starting LONWORKS communication through the network, the data registers in the LONWORKS interface module
have to be initialized. The initialization sequence is illustrated in the chart below:
The following program is an example of an application program in Neuron C to initialize the L
ONWORKS interface mod-
ule, consisting of initialization codes and a header file. When you modify or create an application program, make sure that
the application program includes the following codes in italics.
Initialization Codes
1. ///////////////////////////////
2. /// PRAGMA ///
3. ///////////////////////////////
4. #pragma scheduler_reset
5. /********************************************************
6. Network Variable
7. ********************************************************/
8. /* Define network variables */
9. /********************************************************
10. Write the software version number to C018h
11. *********************************************************/
12. #define FC3ASX5L_VERSION 0x10
13. /********************************************************
14. Write the expansion module ID to C019h
15. *********************************************************/
16. #define EMID_CODE 0x50
17. /********************************************************
18. include file
19. *********************************************************/
20. #include <access.h>
21. #include <msg_addr.h>
22. #include <control.h>
23. #include <status.h>
24. #include <snvt_lev.h>
25. #include “fc3asx5l.h” /* Refer to the header file shown below */
26. /********************************************************
NO
YES
Is the register initial-
ization complete?
Power up
when(reset) Initialization
Start to execute a user program. Initialization is not complete.
I/O LED goes on.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com

Table of Contents

Related product manuals