Skip to main content

IMAC Editor

To start IMAC Editor, open web browser (Google Chrome is recommended for IMAC) and type imac:5000 in the browser address bar.

IMAC Editor contains five areas:

  1. Main Menu
  2. Tabs of sequences
  3. Palette of blocks
  4. Visual Programming Workspace
  5. Control panel
  6. Terminal
Visual Block Programming Environment

Main menu contains File drop-down menu and drop-down menus for each device connected to IMAC.

Manage IMAC program files

File drop-down menu 1
File drop-down menu 2
File drop-down menu 3

IMAC editor has two options available for opening or saving IMAC programs:

1. Using IMAC’s file system

Click on Open from IMAC and the following dialog box appears. Select file and click Open button. Blocks saved in that file will be loaded into visual programming workspace.

Open from IMAC

Click on Save to IMAC, give a file a name, click Save button and blocks that are displayed on the visual programming workspace will be stored in the file.

Save to IMAC

Organize your files by creating folders. Click Create folder icon and additional form will appear.

Create folder

2. Using User's PC file system or local network shared resource

Click on Open from PC and the standard Windows File Explorer dialog box appears. Select file and click Open button. Blocks saved in that file will be loaded into visual programming workspace.

Open from PC

Click on Save to PC. Give a file a name, click Save button and blocks that are displayed on the visual programming workspace will be stored in the file.

Save to PC

If you nead to open last saved file then click on Last saved file.

Last saved file

Manage IMAC config files

IMAC allows to save device settings into config files for later use.

File drop-down menu 3

You can select a config file for the current session by clicking on Set active config. The following dialog window will be opened. Select config file and click on Set button.

Set active config

If you need to make changes to device settings, but you want to keep previous settings, then you need to create a new config file. Click on Save active config as to save current settings into new file. The following dialog window will be open.

Save active config as

Enter a config file name with .cfg extension and click Save button. You need to select a new file as active config file. Click on Set active config and select new config file.

caution

All changes to device settings are being automatically saved into active config file.

IMAC allows to download or upload config files from user's computer.

If you need to send config file to someone, click on Download config to PC, select file and click Download button.

If you need to use config file you received from someone, click on Upload config from PC, select file and save it. After that you can set uploaded file as active config.

Tabs of Sequences

IMAC programs can consist of multiple sequences. Main sequence is where the program starts. Additional sequences can be added and used as ordinary functions or event handlers. Additional sequences are invokable from main sequence or another additional sequences.

main tab
additional tab

How to use additional sequence as event handler

Blocks

Here is an example of block:

block example

Block palette contains the following command block categories:

  • Motion Blocks
  • Time / Event Blocks
  • I/O Blocks
  • Control Flow Blocks
  • Math Blocks
  • Variable Blocks
  • Mics. Blocks
  • User Blocks

Motion Blocks

1. Mode

Sets the type of the motor and the mode in which motor works.

Mode tile
Mode block
Arguments

Motor type:

  • Stepper
  • Servo

Operating mode:

  • Position
Action

Sets the motor type to Stepper and operating mode to Position for axis X on device XYZ.

2. Profile

Sets motion characteristics.

Profile tile
Profile block
Profile block
Arguments

Profile:

  • trapezoidal
  • s-curve

Velocity: (units: counts/sec)

  • positive integer
  • [variable]

Acceleration: (units: counts/sec2)

  • positive integer
  • [variable]

Deceleration: (units: counts/sec2)

  • positive integer
  • [variable]

Jerk: (units: counts/sec3)

  • positive integer
  • [variable]
Action
  1. Sets the motion profile to trapezoidal, velocity, acceleration, deaceleration for axis X on device XYR.
  2. Sets the motion profile to s-curve, velocity, acceleration, jerk for axis X on device XYR.

3. Move

Execute motion with specified parameters

Move tile
Move block
Move block
Move block
caution

If Wait until done is checked block becomes async.

Arguments

Type:

  • Absolute

    Use when you need to move the axis relative to current homing position.

  • Relative

    Use when you need to move the axis relative to current position.

  • Velocity

    Use when you need to move the axis at a constant velocity in the selected direction.

Position: (units: counts)

  • positive or negative integer
  • [variable]

Distance: (units: counts)

  • positive or negative integer
  • [variable]

Direction:

  • Positive
  • Negative

Multiplies the value of position or distance by 1 if Positive, and -1 if Negative.

Wait until done:

  • True (checked)
  • False (unchecked)
Action

Sets the type and direction of the motion. By default the checkbox Wait until done is checked and that means that next block in the sequence is not being executed until the current motion is completed.

If absolute motion is selected, axis moves to absolute position in counts.

If relative motion is selected, axis moves given counts.

If velocity motion is selected, axis moves infinitely in the selected direction.

Sets motion for axis X on device XYZ.

4. Home

Execute pre-configured (default) home positioning.

Home tile
Home block
caution

Async block

Action

Executes home positioning method that is configured in device settings for axis X on device XYR

5. Advanced Homing

Executes home positioning with specified parameters

Homing tile
Homing block
Homing block
Homing block
caution

Async block

Arguments

Method:

  • Current position

    Use when the currect position is needed to be set as homing position.

  • Limit switch

    Use when one of limits is needed to be set as homing position.

  • Home switch

    Use when home switch is needed to be set as homing position.

Direction:

  • Positive

  • Negative

    Selects limit switch which axis moves into to set up homing position

    Indicates direction which axis moves in to find home switch

    Disabled when Current position is selected

Wait until referenced:

  • True

    Always true. Waits for axis completes the homing positioning.

Action

Sets homing method and direction for axis X on device XYZ. Always waits until referenced.

6. Abort motion

Aborts motion

Abort tile
Abort block
caution

If Wait until done is checked block becomes async.

Arguments

Abort deceleration: (units: counts/sec2)

  • positive integer

Wait until done:

  • True (checked)

  • False (unchecked)

    Waits for motion completion if checked.

Action

Aborts motion at axis X on device XYR. Motion gets slower with provided deceleration. Waits until axis stopped if Wait until done is checked.

Time / Event Blocks

7. Wait for digital input

Waits for condition on selected digital input.

Wait Input tile
Wait Input block
caution

Async block

Arguments

Input: (units: positive integer)

  • number of input
  • [variable]

Wait for: (units: Hi / Lo or 1 / 0)

  • input state
  • [variable]
Action

Waits for Hi condition on input 1 on device Seadac. The next block in the sequence will be executed only if expected condition comes on given input.

8. Listen to event

Listens to events.

Listen to Event tile
Listen to Event block
caution

Async block

Arguments

Event:

  • Positive limit switch
  • Negative limit switch

Timeout:

  • True (checked)
  • False (unchecked)

Milliseconds: (units: milliseconds)

  • positive integer
Action

Awaits the Positive limit switch is triggered at the axis X on device XYR. The next block in the sequence will be executed only if awaited event happens.

If during the specified time the event is not occurred, the error will be thrown and the further processing of the sequence of blocks will be stopped.

9. Delay

Waits for specified milliseconds.

Delay tile
Delay block
caution

Async block

Arguments

Time: (units: milliseconds)

  • positive number
Action

Waits for the specified time. The next block in the sequence will be executed only after the time is expired.

10. Wait until done

Waits until the motion launched by previous block is completed.

Wait until done tile
Wait until done block
caution

Async block

Action

Waits until axis X on device XYR completes its motion.

Checks the motion at axis X on device XYR. If the motion does not exist (or the motion is ended) the next block in the sequence will be allowed to run.

Example:

Wait until done example 1
Wait until done example 2
Wait until done example 2

11. Event Listener

Listens to event and executes event handler.

Event Listener tile
Event Listener block
Event Listener Config block
Arguments

Listen to:

  • Input

Device:

  • I/O device

Digital input:

  • number of input

Input value:

  • Hi
  • Lo

Interrupt:

  • True
  • False

Event handler:

  • Tab

Once:

  • True
  • False
Action

Says to interpreter to listen to event in background. As soon as event happens interpreter executes event handler.

If interrupt option is set to true, interpreter does not wait for any async blocks end to execute event handler.

If interrupt is set to false, interpreter waits for async blocks end (like motion completion, awaiting input state change etc.).

If once option is set to true, event listener is being unregistered (removed). It means event handler is being executed only once.

If once option is set to false and if event happens multiple times during execution of event handler or during awaiting async action , event handlers are piled up in the queue. It means event handlers are being executed multiple times, one after another.

When event happens interpreter memorized a block before executing event handler, and when there is no event handlers left in the queue interpreter returns to this memorized block and execute next block after it.

I/O Blocks

12. Set digital output

Sets state of digital output.

Set Output tile
Set Output block
Arguments

Output: (units: positive integer)

  • number of output
  • [variable]

Set to: (units: Hi / Lo or 1 / 0)

  • output state
  • [variable]
Action

When output is set to Hi output transistor is open, conducting current to the load.

When output is set Lo output transistor is closed, no current flows to the load.

13. Read digital input

Reads state of input.

Read Input tile
Read Input block
Arguments

Input: (units: positive integer)

  • number of input
  • [variable]
Action

Reads value of specified input and saves this value in the program's internal memory. The value can be used in the IF-ELSE statement. Also the value can be assigned to variable name.

Control Flow Blocks

14. Repeat

Opens the beginning of the repeated part of the sequence of blocks.

Repeat tile
Repeat block
Arguments

Number: (units: positive integer)

  • number of repeats
info

Defines how many times blocks will be repeated.

Says to IMAC interpreter that starting from the next block there is a chain of blocks ended with End Repeat that should be repeated Number times.

15. End Repeat

Defines the end of the repeated part of the sequence of blocks.

End Repeat tile
End Repeat block
Action

Says to IMAC interpreter that here is the end of a chain of blocks started with Repeat block.

16. While

Opens the beginning of the repeated part of the sequence of blocks. Repeats are conditional and executed if boolean expression evaluated to true.

While tile
While block
Arguments

First boolean expression:

first operand:

  • Number
  • [variable]

operator:

  • Equal to =
  • Not equal to
  • Greater than >
  • Greater than or equal to
  • Less than <
  • Less than or equal to

second operand:

  • Number
  • [variable]

Boolean operator:

  • OR
  • AND

Second boolean expression:

first operand:

  • Number
  • [variable]

operator:

  • Equal to =
  • Not equal to
  • Greater than >
  • Greater than or equal to
  • Less than <
  • Less than or equal to

second operand:

  • Number
  • [variable]
info

Says to IMAC interpreter that starting from the next blocks there is a chain of blocks ended with End While that should be repeated if boolean expression evaluates to true.

17. End While

Defines the end of the repeated part of the sequence of blocks.

End While tile
End While block
Action

Says to IMAC interpreter that here is the end of a chain of blocks started with While block.

18. If and Else If

Allows for conditional execution of block sequence fragment.

If tile
If block
Else If tile
Else If block
Arguments

First boolean expression:

first operand:

  • Number
  • Numner of input
  • [variable]

operator:

  • Equal to =
  • Not equal to
  • Greater than >
  • Greater than or equal to
  • Less than <
  • Less than or equal to

second operand:

  • Number
  • Lo / Hi
  • [variable]

Boolean operator:

  • OR
  • AND

Second boolean expression:

first operand:

  • Number
  • Number of input
  • [variable]

operator:

  • Equal to =
  • Not equal to
  • Greater than >
  • Greater than or equal to
  • Less than <
  • Less than or equal to

second operand:

  • Number
  • Lo / Hi
  • [variable]
Action

If the boolean expression returns true the next blocks are being executed until IMAC interpreter meets next Else If block or associated Esle block or End If block. If the condiction is false the next blocks are being skipped and IMAC interpreter will look for next Else If block or assocciated Else block or End If block to continue execution of the blocks.

Sample use case
If-Else example 1
If-Else example 2
If-Else example 3
If-Else example 4
If-Else example 5
If-Else example 6
If-Else example 7

If Input 2 is High and Input 3 is Low then move axis X 25000 counts in positive direction, else if Input 2 is High and Input 3 is Low then move axis X 25000 counts in negative direction, else home axis X.

19. Else

Else tile
Else block
Action

Says to the interpreter to start the execution of the blocks from here to the next End If block if the boolean conditions of associated If of Else If blocks are false.

20. End If

End If tile
End If block
Action

Says to the interpreter that this is the end of If or If-Else statement.

21. Pause

Pause tile
Pause block
caution

Async block

Action

Says to the interpreter to pause the execution of blocks until the Resume button is clicked.

22. Exit

Exit tile
Exit block
Action

Says to the interpreter to stop execution of blocks and exit.

Math Blocks

23. Basic math

Performs four basic mathematical operations: addition, subtraction, multiplication and division.

Math tile
Math block
Arguments

Var.: (string)

  • variable name

Operand 1:

  • Number
  • [variable]

Operator:

  • +
  • ÷
  • ×

Operand 2:

  • Number
  • [variable]
Action

Saves result of operation into the variable with specified name.

Variable Blocks

24. Value to Variable

Assigns value to the variable.

Variable Value tile
Variable Value block
Arguments

Name:

  • string without special characters

Value:

  • Number
Action

Creates a variable in the local variable scope and assigns value to it.

25. Varibale to Variable

Assigns variable to another variable.

Variable Value tile
Variable Value block
Arguments

Name:

  • string without special characters

Name:

  • variable name
Action

Creates a variable in the local variable scope and assigns value of another variable to it. If another variable does not exist in the local scope, it is being looking for in the outer scopes and global scope. If it does not exist then error is being thrown.

26. Parameter to Variable

Assigns value of input / output / register to the variable.

Variable Parameter tile
Variable Parameter block
Arguments

Name:

  • string without special characters

Parameter:

  • Number of input
  • Number of output
  • Register address (for motor controller only)
Action

Creates a variable in the local variable scope. Requests value of parameter from device and assings it to variable. If it's unable to receive value of parameter, throws error.

27. Array

Creates an array of elements (ex. points) and executes following blocks once for each array element.

Array tile
Array block
Arguments

Array:

  • string without special characters (name of array)

Element:

  • string without special characters (name of array element)

Elements:

  • Array

Ways to create array:

  1. Manually using add row and add column buttons.
  2. Importing from csv file.
    Array block dialog
  3. Using Array Wizard to create csv file and then importing it. Main menu -> Tools -> Array wizard
    Array wizard
Action

Says to interpreter to execute following blocks once for each array element.

28. End Array

Indicates the end of sequence of blocks executed by array block.

End Array tile
End Array block
Arguments
Action

Indicates the end of sequence of blocks executed by array block.

Mics. Blocks

29. Print

Outputs a message to the terminal.

Print tile
Print block
Arguments

Source:

  • variable
  • input
  • ouput
  • register

Name/Input/Output/Register:

  • Variable name
  • Number of input
  • Number of output
  • Register address (for motor controller only)

Text:

  • string
Action

Outputs a message to the terminal. Message can consist a text with a value of variable/input/output/register.

30. Comment

Adds comment to the block sequence. User adds comments by clicking on the icon inside the block.

Comment tile
Comment block
Action

Does nothing

User Blocks

The User blocks are the blocks created by user from standard blocks or/and another user blocks. The User blocks can be deep nested. User can create user blocks from another user blocks which consist another user blocks.

Here is created user block which moves the gantry system to the reference point.

User Block tile
User block block

To see the inner blocks and edit them click Unfold in the dropdown menu.

User Block tile

To fold the user block back click Fold.

User Block tile
User block block
User block block

To learn more about User blocks please see The User Block Guide.

Sending ASCII commands through the terminal

User has a full control over the motor drives through the Terminal. Refer to the ASCII Programmer’s Guide for available commands and syntax. The syntax of IMAC ASCII message is:

[usb port]:[axis letter][_command code_][command parameters]

Examples:

usb0: 1 g r0x70

Get the value of register 0x70 at axis 1 of motor drive connected to USB port 0.

usb0: 0 s r0xc8 0

Set the trajectory generator to absolute move, trapezoidal profile

usb0: t 2

Execute homing.