Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Data acquisition using Fortran and RS232 Port

  1. Dec 25, 2015 #1
    I'm on Linux, and I want to treat the flow of data through the RS232 port, using the Fortran language , how can I do?
  2. jcsd
  3. Dec 26, 2015 #2


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Hello Ariche, :welcome:

    I see you don't get a rapid response, so I'll put in my two cents (fortran knowledge OK, interfacing directly via serial port, ...?):

    You'd need a driver of some sort to do this. To write fortran calls like https://www.xlsoft.com/jp/products/intel/cvf/docs/vf-html_e/pg/pggsport.htm [Broken]

    Googling gives a lot of discussions on why not to use fortran for such things, but they are interspersed with tips that might be useful (this one? this ? Or in PF ?)
    Last edited by a moderator: May 7, 2017
  4. Dec 27, 2015 #3


    User Avatar
    Gold Member

    What is the reasoning behind your decision to implement in Fortran?
    Is is because the signal processing functions are implemented in Fortran, and you don't want to, or can't convert to another language?

    An alternate approach might be to write the controlling functions in C and interface to the Fortran from there.
    I'd prepare buffers of data with C and pass them to the fortran processing. You can research calling fortran from C.

    In Linux the serial port (as does all IO) appears as a file you can read from. I'm not sure how to open it and read it from Fortran.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Data acquisition using Fortran and RS232 Port
  1. Storing data in fortran (Replies: 10)