LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling fortran from labview

hi
my question is if i am having one fortran exe . where  i want to choose the file which is to be manipulate and after that i want to call that fortran exe to manipulate and the result should display using labview...because manipulating that using labview which takes so much of time so that i am going for fortran ...any one plzzz 
thanks in advance..
------------------------------------------------------------------------------------------------------------------
Indrajit

| indrajitbarve@gmail.com | indar_indar2005@yahoo.co.in .
0 Kudos
Message 1 of 11
(3,742 Views)
You can use "System exec.vi" in the "Connectivity->Libraries & Executables" to call exe files.

Regards,

André
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 11
(3,735 Views)
hi
 i am using system exec .vi but in that the exe file willl ask one file which is standard but last number will change for example data 0 then data1 like that
here i want to automate that taking the file one by one and it should go for manipualtion.
ok

------------------------------------------------------------------------------------------------------------------
Indrajit

| indrajitbarve@gmail.com | indar_indar2005@yahoo.co.in .
0 Kudos
Message 3 of 11
(3,680 Views)

You can use the string format functions to build your command line to send to the sysexec.  Doing this in a loop can simulate a batch (Pass an array of static strings) or using the index to automate do for data1 to datan type batches.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 11
(3,668 Views)


@indrajit wrote:
my question is if i am having one fortran exe . where  i want to choose the file which is to be manipulate and after that i want to call that fortran exe to manipulate and the result should display using labview...because manipulating that using labview which takes so much of time so that i am going for fortran ...any one plzzz 

There are two issues:

  1. Calling an executable (using system exec). At this point it is irrelevant what programming language was used to create the code.
  2. Problems with slow LabVIEW code.

There is no good reason why LabVIEW should be much slower that fortran code, so maybe you are doing things wrong. (too many data copies, building arrays inside loops, etc.). If you show us your LabVIEW code, we might be able to tell if there are problem areas. LabVIEW code can be made very fast! If fortran is significantly slower, you are pumping a lot of hot air in your LabVIEW code.

What exactly does the fortran code do?

Another option: If you know fortran and have access to the source code, you can built your fortran code into a dll. This will make a few things easier. 🙂 I would recommend this way if the algorithm is very complex and the fortran code works perfectly.

0 Kudos
Message 5 of 11
(3,660 Views)
hi
i am having the source code for the fortran code .can u say the steps how  can i built my fortran code into a dll.
plz
advance in thanks
------------------------------------------------------------------------------------------------------------------
Indrajit

| indrajitbarve@gmail.com | indar_indar2005@yahoo.co.in .
0 Kudos
Message 6 of 11
(3,638 Views)
What fortran compiler do you have?
0 Kudos
Message 7 of 11
(3,632 Views)
fortran compiler  4.01
------------------------------------------------------------------------------------------------------------------
Indrajit

| indrajitbarve@gmail.com | indar_indar2005@yahoo.co.in .
0 Kudos
Message 8 of 11
(3,611 Views)
Is this microsoft? This later turned into compaq visual fortran. (http://www.qtsoftware.de/dvf/) so they should probably work about the same.
 
0 Kudos
Message 9 of 11
(3,583 Views)
hello
step by step i am saying
1.i am using labview 8.2 eval version
2.where i am having one exe code which manipulates some data .
3. now if i am executting that exe .that will ask the file name which should be taken into the manipulation process.
4. after execustion it give some graph.
5.i developed that exe using fortran .
6.now using the labview i want call the exe file for everydata.
7. i will do that process for 72 times.
8. where the file name is "data0"...and "upto data72"
 i think it gives a clear picture to you.
here i want to pass the file name to the exe....????????????????
plz
------------------------------------------------------------------------------------------------------------------
Indrajit

| indrajitbarve@gmail.com | indar_indar2005@yahoo.co.in .
0 Kudos
Message 10 of 11
(3,578 Views)