beautypg.com

Remote Processing CX-10 User Manual

Page 13

background image

SETUP AND OPERATION - MODBUS and BASIC

SECTION 2

Page 2-8

Demo directory is an example of automated download
process. This program clears out the old program and
prepares for a new one.

Programming Commands
The following programming commands are used on the
CX-10. For some part they follow the original Basic-52
structure. However, there are some differences due to
the nature of the flash in the CPU. For example, baud
rates and MTOP are not saved.

If you only have one program, then programming is easy.
Only NEW, RAM ,FPROG0, PROG, and PROG2 are of
concern. Other information concerning program storage
structure is not of concern.

If you have multiple programs, things get a bit more
complicated. You can have a large number of different
programs, all of which can call any of the other programs
stored in flash. It might help to these of these programs
as stacked on top of each other. The program at the
bottom is referred to as ROM 1. The next would be
ROM 2, located above the first program. ROM1 can be
any length (so long as it can fit into flash). Same is true
with ROM 2 and so on (as long as it can fit into flash).

When editing programs, only the highest numbered
ROM can be changed.

For the most part, if you have just one program stored to
flash, you can treat it as RAM. That is, you can add,
delete, or change a line of code. It may take noticeably
longer, especially when you have a large program, before
you get the ‘>’ prompt.

If you have several programs, editing programs gets a bit
more complicated. You can have a large number of
programs stored in flash EPROM. However, only the
largest numbered program can be edited. For example:
You have programs in slots 1, 2, and 3. You can only
change/edit the program in slot 3 (also called ROM 3).
Programs in slots 1 and 2 (ROM 1 and ROM 2) cannot
be edited. If you need to change the program in 1 or 2, in
this case, you need to do an FPROG0 in RAM to clear
out all programs then download them again.

>prog

1
8025H