JVL Industri Elektronik A/S - User Manual - Integrated Stepper Motors MIS23x, 34x, 43x 329
16.7 Serial communication
Block description
The returned data has the following format:
Program states:
Block Name Protected Example Description
<PStat> No 61h,61h,61h Program status command
<Address> Yes 07h,F8h (Address 7) The address of the SMC75’s to write to.
<Len1> Yes 01h,FEh (Len = 1) Length of the command data
<Data1> Yes 01h,FEh (Start) Command data
<MAddress> Yes 00h,FFh (Address 0)
This will always be 0, because this is the
address of the master
<Len2> Yes 08h,F7h (Len = 8) The length of the return data
<Data2> Yes
09h,F6h, (Program state)
00h,FFh, 00h,FFh, (Pro-
gram pointer)
00h,FFh, (Stack pointer)
00h,FFh,
00h,FFh, (Program check-
sum)
80h,7Fh, (Inputs)
00h,FFh (Outputs)
Data returned from SMC75
<End> No AAh, AAh Command termination
Data offset Size Description
0 8 bit Program state. See table below for states.
1 16 bit Program pointer. The current location of the program pointer.
3 8 bit Stack pointer
4 16 bit
Program checksum. This checksum is calculated when the program
is
started.
6 8 bit Input status.
7 8 bit Output status
Program
state
Name Description
0 Passive The program execution is stopped. This state is only entered shortly at power-up.
1 Running The program execution is running
2 Single Step
A single step is in progress. The program will run until the selected program
position is reached.
3 Paused The program execution is paused, but can be resumed again.
4 Stack Overflow The stack pointer has overflowed
5 Program Overflow The program pointer has overflowed.
6 Invalid Ins. An invalid instruction is encountered in the program.
7 Stopped The program execution is stopped.
8 Com. Error Internal communication error has occurred. This cannot happen on SMC75.
9 Starting Program
Program execution is being prepared. After this is completed the state will change
to running.
10 Flash Error The program data is corrupted.
11 Flash Checksum Error The program data checksum is incorrect.