LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

'Serial Port Init.vi' problems between versions 6.1 & 7.1 of Labview

Hi there,

 

I created a Card Test Program using Labview 6.1 in 2003, it now requires changes to be carried out.

 

My company is now using Labview 7.1, however, once I have created an executable from the vi's and attempt to run it on the target system I get an Error 37 with the 485 card, labview device not found. Yet if the changes are made within Labview 6.1 it runs fine (but as we are now using labview 7.1 it is preffered that I use that.

 

I presume this is an issue with the 'Serial Port Init.vi' that I am using, everything else works fine, except any of the vi's that are used to initialise, communicate with and close a 485 port. Is there any differences between the ‘Serial Port Init.vi’ that comes with Labview 6.1 and that which comes with Labview 7.1. Any help gratefully appreciated.

 

Regards

 

Simon Snoddy

0 Kudos
Message 1 of 6
(4,689 Views)
Are you using VISA or the old serial functions?
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 6
(4,677 Views)

It is the old serial functions that I am using. The data is being sent directly from an FPGA, I therefore have to use the 'Type Cast' function to convert the string into binary so that I can manipulate it, but at the moment, using Labview 7.1 I can't even initialise the 485 ports.

Any help would be gratefully appreciated.

Cheers

Simon

0 Kudos
Message 3 of 6
(4,671 Views)

Hello Simon,

The issue that you are seeing is due to the fact that serial communications methods in LabVIEW were changed between LabVIEW 6.1 and LabVIEW 7.x. The serial compatibility vi's that you were using were modified to make use of VISA, and users were advised to just use the lower level VISA functions instead.

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/6807113b057fde4c86256b41008212ed?O...

It is possible to use the old version of the serial within LabVIEW 7.x but this is not supported. You will need to copy some of the files from the older version of LabVIEW in order to make this work. This will affect these vi's for every application that you create. For newer applications it is advised that you use VISA instead. Before you do this, make sure that you open your vi, and that it is using the vi's from the LabVIEW 7.1 installation - and not any vi's that you may have bundled with it into a llb.

1. Replace the serial.llb in LabVIEW 7.x with the serial.llb from a previous version of LabVIEW. This file is found in C:\Program Files\National Instruments\LabVIEW\vi.lib\instr.
2. Replace the _sersup.llb file in LabVIEW 7.x with the _sersup.llb from a previous version of LabVIEW. In LabVIEW 6i and 6.1 this file is located in C:\Program Files\National Instruments\LabVIEW\vi.lib\platform. In LabVIEW 7.x (and 5.x) this file is found in C:\Program Files\National Instruments\LabVIEW\vi.lib\instr.
3. Copy the file serpdrv to the C:\Program Files\National Instruments\LabVIEW 7.x directory. This file is not installed with LabVIEW 7.x, so it only needs to be copied from a previous version of LabVIEW, not replaced.

This should work, and then your application will run using the older version of the vis. But like I said this is not supported, and it is recommended that you upgrade the application to make use of the VISA functions instead. 

I hope this helps, let me know if you have any issues

Regards
Hannah
NIUK & Ireland

0 Kudos
Message 4 of 6
(4,395 Views)

I have upgraded the old serial functions with visa functions many times, this is not difficult.  Essentally there is usually a 1:1 exchange.  Visa is much more flexable than the old serial functions and is worth the change.  I run into this evey time I get an old driver written in 6.1 or earlier. 

 

Paul

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

I would just like to thank everyone for their assistance, I have now resolved the problem and everyone is happy.

 

Regards


Simon.

0 Kudos
Message 6 of 6
(4,314 Views)