Software Archive
Read-only legacy content
17061 Discussions

serial port communications

Intel_C_Intel
Employee
267 Views
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
0 Kudos
1 Reply
bdrichards
Beginner
267 Views
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
0 Kudos
Reply