Back to top

How to initialize an array in akd-basic?

0 votes
+ vote
Vote up!

I want to store an array of predefined values, I am trying something along the lines of

Dim p1(5) as integer

p1 = {1,2,3,4,5}

It gives the error: expected a ':' or a new line .

This is my first time working with basic and all tutorials inline land on visual basic declaration methods which does not seem to be working. Can someone help me out?


1 Answer

0 votes
+ vote
Vote up!


I haven't seen arrays used much with the AKD BASIC but the language does support it.

The AKD BASIC Programming Manual is intrinsic to the Web Help or Workbench software.

Here are some useful and related links.

AKD BASIC Programming Manual (

Arrays and Function Parameter Lists (

Here is my experiment which works fine.


Note there are also some sample projects on our website.

AKD BASIC programming is a full class at Kollmorgen.
There is a series on YouTube called "Two Minutes of Motion" which contains many short videos 

related to AKD BASIC and programming.

Search Page | Kollmorgen

I also recommend you engage your local Kollmorgen distributor from whom you purchased the 
AKD BASIC drive for local support and commissioning.

I hope this helps!

Todd Evans

L2 Support





This question has been answered and is now closed. If you have further questions, please contact Kollmorgen Support or open a new question.

You may login with either your assigned username or your e-mail address.
The password field is case sensitive.

If you do not have an account, click here to register.