MEGA-F  TRAINING

 

 

                                    Technical Note

 

 

                        “My First Mega-F Program”

 

 

 

                                        Written by:

 

                                    Dr. Boaz Eidelberg

                                        Optinet Inc.

 

                    Main Mega-F Representative in the USA

 

 

 

                                        April 5, 2006

 

 

Objective:

 

The objective of this note is to train Mega-F users in writing their first simple code.

 

Training Equipment:

 

Bental Motor + Encoder

Mega-F Wiz Alg Evaluation Unit

User’s Host PC Computer

Mega-F Test and Evaluation software INSTALLED in Host computer

Plug and Play Cables Connecting Wiz Alg Evaluation Unit to the Host Controller and to Bental Motor / Encoder 

 

Write and run code in 4 simple steps:

 

  1. Open PDL Screen
  2. Write code, COMPILE and LOAD
  3. Assign Values to code variables
  4. RUN code

 

 Step 1 - Open PDL Screen

 

 1.1    Click WizAlg Icon on your Host Main Screen. WizAlg main screen appears

1.2    In the main WizAlg screen click on the upper write icon “Open PDL “  as shown in Fig 1

 

 

                                                             Fig 1 -  Open PDL

  

  1. Write, Compile and Load code

 

2.1 In PDL Screen Define variables and write code as shown in Fig 2

2.2 After code is completed click COMPILE icon as shown in Fig 2

2.3 After compiling click LOAD as shown in Fig 2

 

 

 

                    Fig 2 – Code with “COMPILE” and “LOAD” icons

 

 

Notice that the Code by the name of _bo_test: has the motor start at bo_start_pos , then go to position bo_pos1, then dwell for

bo_delay msec and go back to start position. All code variables are defined as long variables.

 

 Step 3 – Define Code variables and Assign Their Respective Values

 

3.1 Click on the “Toggle Variable Table” Icon as shown in Fig 3

3.2 Enter the definitions of program variables as shown in the green boxes of Fig 3

3.3 Right click in each green box and select “General Variable”

3.4 Enter the Values of your defined code variables as shown in the respective white boxes of Fig 3

 

 

 

                                    Fig 3 -  Define Variables and Assign their Values

 

Step 4 – RUN code

 

 4.1  Click on the dot next to RUN and select the name of your new code bo_test as shown in Fig 4.

.

                                                 Fig 4 – Select your Code Name to RUN

  

4.2  Click RUN button and observe the scope as shown in Fig 5.

                                                     Fig 5 – RUN your Code

 

Notice that the Code parameters were defined to have the motor start at start position of 0 counts, then go to

position 60000 counts, dwell for 1000 msec and go back to start position. The position profile ( from 0 to 60000 )

and position error ( +/- 2 counts ) of these moves are shown in the upper and lower screens of the scope respectively.

 

For more Mega F easy going tutorials for high performance system analysis please see

For schedule of our next demo in your territory please inquire with webmaster@optinetinc.com