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?

0 Comments

1 Answer

0 votes
+ vote
Vote up!

Anuj,

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 (kollmorgen.com)

Arrays and Function Parameter Lists (kollmorgen.com)

Here is my experiment which works fine.

image

Note there are also some sample projects on our website.

https://www.kollmorgen.com/sites/default/files/public_downloads/AKD%20BASIC_Sample_Programs_en-us.zip


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

Kollmorgen

 

 

0 Comments
ANSWER THIS 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.