ProSoft Technology MVI56-BAS User Manual
Page 8

Contents
MVI56-BAS ♦ ControlLogix Platform
User Manual
BASIC Module (DB/BAS Compatible)
Page 8 of 234
ProSoft Technology, Inc.
December 13, 2011
5.4.4
Using XRAM and EPROM Programs as Subroutines ............................................ 52
5.4.5
Automatically Executing ROM 1 at Power-up ......................................................... 52
5.5
Creating Offline BASIC programs ........................................................................... 53
5.5.1
Downloading BASIC Files From a PC to the MVI56-BAS ...................................... 53
5.5.2
Uploading BASIC files from the MVI56-BAS to a PC ............................................. 56
5.5.3
Loading a BASIC Program ..................................................................................... 58
5.6
Module Backup ....................................................................................................... 59
5.6.1
Backup with a Compact Flash Card Reader .......................................................... 59
5.6.2
Backup without a Compact Flash Card Reader ..................................................... 59
5.7
Module Restoration ................................................................................................. 61
5.7.1
Restoration with a Compact Flash Card Reader .................................................... 61
5.7.2
Restoration without a Compact flash Card Reader ................................................ 61
5.8
Program Copies ...................................................................................................... 63
5.9
Running a BASIC Program ..................................................................................... 64
5.10
Debugging a BASIC Program ................................................................................. 65
5.11
Commenting a BASIC Program .............................................................................. 70
5.12
Checking Available and Used RAM Memory .......................................................... 71
5.13
Exit a BASIC Program (Ctrl+C) .............................................................................. 72
6
Using ASCII Communications
73
6.1
Port Transmit and Receive Buffers ......................................................................... 74
6.2
ASCII Data Transfer from MVI56-BAS Serial Port to CLX ..................................... 75
6.3
ASCII Data Transfer from CLX to MVI56-BAS Serial Port ..................................... 78
7
Using DF1 Protocol Communications
81
7.1
Operation ................................................................................................................ 82
7.2
Communication ....................................................................................................... 83
7.3
DF1 Commands ...................................................................................................... 84
7.4
Sending a DF1 Read Command ............................................................................. 85
7.5
Sending a DF1 Write Command ............................................................................. 87
7.6
Receiving a DF1 Write Command .......................................................................... 89
7.7
Transmitting a DF1 Packet ..................................................................................... 91
8
Using DH-485 Communications
93
8.1
Data Transfer Between the CLX and a Remote SLC DH-485 Data File ................ 94
8.2
Writing to a Remote DH-485 SLC Data File (CALL 28).......................................... 95
8.3
Reading From a Remote DH-485 SLC Data File (CALL 27) .................................. 97
8.4
Data Transfer Between a MVI56-BAS Internal String and a Remote DH-485 SLC
Data File
98
8.5
Data Transfer Between the MVI56-BAS and Remote DH-485 Data Files ............. 99
8.6
Transfer Data Between the MVI56-BAS Module and a Remote Common Interface
File (CIF)
101
8.6.1
Using the MVI56-BAS Common Interface File (CIF) ............................................ 102
9
BASIC CALLs Syntax
105
9.1
Data Conversion CALLs ....................................................................................... 106
9.1.1
Input CALLs .......................................................................................................... 106
CALL 14: Convert 16-Bit Signed to Float Point ......................................................................... 106