Program status, Long programisrunning(char* name), Long stoprequested(void) – Rockwell Automation 2098-IPD-xxx Ultra5000 C Programming using the Motion Library User Manual

Page 56: Serial services, Long serialclose(void), Char serialgetchar(void), Long serialopen(long baudrate), Char serialputchar(char character), Program status -16, Serial services -16

Advertising
background image

Publication 2098-PM001E-EN-P — July 2002

2-16

Referencing the Motion Library

Program Status

long ProgramIsRunning(char* name);

Determines if the specified program is running.

Returns non-zero if the program is running.

long StopRequested(void);

Determines if a program stop has been requested.

Returns non-zero if the program is requested to stop.

Serial Services

long SerialClose(void);

Close ASCII communications on CN3B

Returns 0 if successful, or -1 on an error.

char SerialGetChar(void);

Returns a character from the ASCII receive buffer.

Returns character if successful, or 0 on an error.

long SerialOpen(long baudrate);

Open ASCII communications on CN3B at the specified baud rate

Returns 0 if successful, or -1 on an error.

char SerialPutChar(char character);

Inserts a character into the ASCII transmit buffer.

Returns 0 if successful, or -1 on an error.

ATTENTION

!

This function must be called in your main program
execution loop if the program is to react to a Stop
command. If this is not used (as in the previous
examples), the Stop command will be ignored. It is
your responsibility to write the program to check and
react properly to this event!

Advertising