adccommunitymod (AutomationDirect) asked a question.

Fx-CPxxx BASIC language

Created Date: February 18,2006

Created By: yura

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

Just emotions. I 'v just finished (ooh) my project with F0-CP128. Successfully. BASIC's bugs almost killed me. Considering that I didn't use 'ABM Commander ' except for down/uploading program texts. The Greatest bug i found is that BASIC interpreter 'eats ' space-characters in some cases and it got me crazy. Ex. You type : 1000 IF NOT S06_C(0) THEN ... that's what you 've got : 1000 IF NOTS06_C(0) THEN... then : 2000 IF ERRNO THEN ... becomes 2000 IF ERRNOTHEN.... I guess it's not the whole list... 1000 i=9 1010 print1 S06_C(i) - > > > Error !!! but i is a number so i must have S06_C(11) value !!! Sorry, FACTS, it was my 1st experience. May be I will love F0-CP128...


  • adccommunitymod (AutomationDirect)

    Created Date: February 20,2006

    Created by: FACTSTech

    Sorry that you had problems. The F0-CP128 does have a unique syntax. When the listed program line does not look like you expect this is generally a sign of bad syntax or keywords embedded in variable names. See chapter 2 of the FA-BASIC-M manual for interpreter rules.

    The NOT operater requires parenthesis so it should be written:

    1000 IF NOT(S06_C(0)) THEN...

    In line 2000 enclosing the variable name ERRNO in parenthesis will give the expected result:

    2000 IF (ERRNO) THEN ...

    The S06_C() statement directly reads/writes C bits in the PLC CPU. C9 does not exist in the PLC CPU so the statement S06_C(9) generates a 'Bad Argument ' error. THE 05/06 PLC CPUs use Octal to reference data types so any address with the digit 8 or 9 is invalid in the standard usage of S06_.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: February 22,2006

    Created by: FACTSTech

    You are correct, you need to use ABM commander to load/save programs from disk. There is not a command line utility to do this function.

  • adccommunitymod (AutomationDirect)

    Created Date: February 18,2006

    Created by: yura

    Just emotions. I 'v just finished (ooh) my project with F0-CP128. Successfully. BASIC's bugs almost killed me. Considering that I didn't use 'ABM Commander ' except for down/uploading program texts. The Greatest bug i found is that BASIC interpreter 'eats ' space-characters in some cases and it got me crazy.

    Ex. You type :

    1000 IF NOT S06_C(0) THEN ...

    that's what you 've got :

    1000 IF NOTS06_C(0) THEN...

    then :

    2000 IF ERRNO THEN ...

    becomes

    2000 IF ERRNOTHEN....

    I guess it's not the whole list...

    1000 i=9

    1010 print1 S06_C(i) ->>> Error !!!

    but i is a number so i must have S06_C(11) value !!!

    Sorry, FACTS, it was my 1st experience. May be I will love F0-CP128...

    Expand Post