beautypg.com

ProSoft Technology MVI56E-LDM User Manual

Page 58

background image

Understanding the MVI56-LDM API

ControlLogix Platform ♦ "C" Programmable

Developer's Manual

Linux Application Development Module

Page 52 of 264

ProSoft Technology, Inc.

March 12, 2014

upon data availability and block number is the expected next block, the block

number is updated, the data is copied to the newly created write block, and a
new write block is sent back to the controller using the

OCXcip_WriteConnected

routine.

display "open success" on the 4-character display using the function Display.

read the state of the Setup Jumper using the function

ReadSwitches

and prints

this information to the console.

If the block number is not the expected number, the 16-bit integers in the

write block are incremented to form a new write block of data which is sent to
the Controller using the

OCXcip_WriteConnected

API routine. The program

then waits for another block of data from the Controller using the

OCXcip_WaitForRxData

routine.

If any of the calls to an OCXcip library routine fail, the returned error code is

converted into a human readable string using the

OCXcip_ErrorString

routine

and printed to the console.