Data acquisition using Fortran and RS232 Port

In summary, the conversation discusses the use of Fortran for interfacing with the RS232 port on Linux. The suggested approach involves using a driver and researching ways to call Fortran from C. It is also mentioned that the serial port appears as a file that can be read from in Linux. The reasoning for using Fortran and the possibility of using another language is also briefly mentioned.
  • #1
Ariche
1
0
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?
 
Technology news on Phys.org
  • #2
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

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:
  • #3
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.
 
  • Like
Likes Silicon Waffle

Related to Data acquisition using Fortran and RS232 Port

1. What is data acquisition and why is it important?

Data acquisition is the process of collecting and recording data from various sources. In scientific research, data acquisition is crucial for obtaining accurate and reliable data for analysis and interpretation. It allows scientists to make informed decisions and draw conclusions based on empirical evidence.

2. How does Fortran play a role in data acquisition?

Fortran is a programming language commonly used in scientific and engineering applications, including data acquisition. Its efficient and powerful computational capabilities make it suitable for handling large amounts of data and performing complex calculations. Fortran also has built-in features for interacting with hardware, such as RS232 ports, making it a popular choice for data acquisition systems.

3. What is an RS232 port and how is it used in data acquisition?

An RS232 port is a serial communication interface that allows data transfer between a computer and external devices, such as sensors or instruments. In data acquisition, the RS232 port serves as a connection point for receiving data from these devices, which can then be processed and stored for analysis.

4. Can Fortran be used for real-time data acquisition?

Yes, Fortran can be used for real-time data acquisition. Its efficient and high-speed processing capabilities make it suitable for handling data in real-time, such as in monitoring systems or control applications. However, the specific implementation may vary depending on the hardware and software used.

5. Are there any limitations to using Fortran for data acquisition?

While Fortran is a powerful language for data acquisition, it may not be the best choice in all situations. For example, if the data acquisition system requires a graphical user interface or extensive data analysis, other languages may be more suitable. It is important to consider the specific requirements and capabilities of the data acquisition system before deciding on the programming language to use.

Similar threads

  • Programming and Computer Science
2
Replies
62
Views
4K
  • Programming and Computer Science
Replies
2
Views
939
  • Programming and Computer Science
Replies
20
Views
3K
  • Programming and Computer Science
2
Replies
62
Views
10K
  • Programming and Computer Science
Replies
14
Views
4K
  • Programming and Computer Science
Replies
7
Views
2K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
Replies
12
Views
2K
  • Programming and Computer Science
Replies
8
Views
2K
Back
Top