beautypg.com

4sample code – ProSoft Technology MVI69E-LDM User Manual

Page 43

background image

MVI69E-LDM ♦ "C" Programmable

Contents

Linux Application Development Module

Developer's Manual

ProSoft Technology, Inc.

Page 43 of 130

August 21, 2014

4

Sample Code

In This Chapter

Establishing a Console Connection .......................................................44

Sample Tutorials ....................................................................................46

Application Tutorials...............................................................................52

To help understand the use of the MVI69E-LDM module, several example programs are
provided with the module. These programs exist both as source code in the development
environment as well as executable programs in the MVI69E-LDM module in the

/psft/sample

directory.

You can build and download the sample programs to the MVI69E-LDM module. The sample
programs are designed to show one or more sets of functionality.

LED Sample
 Opens the backplane
 Read and print module information
 Read and print version information
 Read and print module configuration jumpers
 Continuously change the state of the front panel LEDs
Backplane Sample
 Opens the backplane
 Set up communications with the PLC
 Read and display module information
 Read and write connected data with the CompactLogix processor
Server Ethernet Sample
 Opens the backplane
 Listens for a request on a well known port
 Responds with the date/time of the module
Client Ethernet Sample
 Opens the backplane
 Sends a request to another module; to the server Ethernet Sample
 Prints the response to the terminal
Serial Sample
 Opens the backplane
 Reads and modifies the serial configuration
 Transmits though the serial port
Install LDM
 Sets the module identity to ProSoft LDM
 Opens the backplane
 Read and print module information