serial port communications

serial port communications

I have begun trying to resucitate an old 16-bit fortran program that read data sent from another device via a serial port. I'm having trouble tracking down documentation to help me implement the SPORT routines. For example, I can manage SPORT_SET_STATE:

ISTATE=SPORT_SET_STATE(PORT,1200,0, 8, 2)

and SPORT_CONNECT:

ICOM=SPORT_CONNECT(PORT, 0)

but I hit a snag on SPORT_READ_DATA (or SPORT_READ_LINE).

In PowerStation the old command would be:

READ(str,'(2x,f9.3)')DATA

But what would be a corresponding implementation for SPORT_READ_DATA?

Thanks,

Dave

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I found the included, online CVF documentation to be fairly helpful.
The following is a very simple illustration of how I have used this command:

itest = sport_read_line(hcom1,scan1,icount)

where
hcom1 is the comport number, scan1 is a string to hold the read data and icount is the count of bytes read.

You should have access to online help for sport_read_line in DevStudio.

Hope this helps.
Regards,
Bill D. Richards
North Idaho College

Leave a Comment

Please sign in to add a comment. Not a member? Join today