05-13-2009 07:28 AM
05-14-2009 06:53 AM - edited 05-14-2009 06:54 AM
Hi Marla, looks like an interesting project you are working on.
Please could I confirm which versions of the NI software you are running. You need to ensure that the following are installed on the host/development machine…
1. LabVIEW 8.5 or later
2. LabVIEW Real-Time Module 8.5 or later
3. LabVIEW FPGA Module 8.5 or later
4. NI-RIO 2.4 or later
5. NI-Serial - Windows Vista x64/2000/Vista x86/XP - NI-987x Module (8.5, 8.5.1 only.)
It is important to note that the NI-Serial - Windows Vista x64/2000/Vista x86/XP - NI-987x Module is only needed separately if using LabVIEW 8.5.x with NI-RIO 2.4.x.Further information can be found in the following KB article.
Required Software for NI-987x Module for cRIO
Assuming the requisite software is present and correct, please have a look at the cRIO serial example which ships with LV. You will find this by clicking Help in the tool bar and selecting "Find Examples". Alternatively, you could click find examples via the LabVIEW splash screen. At the “Find Examples Pop-Up” please navigate to the following file…
Hardware Input and Output > cRIO > Module Specific > Serial > NI-987x Serial Loopback.
The code is well documented, and should be fairly easy to follow. The project includes 3 different methods of using the 987x serial module, depending on the cRIO controller you using. Note that, you will need to have NI-RIO 3.1 or above installed to have the example function correctly “out of the box”. If you have an older version of the NI-RIO drivers please consider upgrading or, alternatively, let me know and I can supply you with a list of steps to work around the problem.
I hope this has been help to you Marla,
Best wishes,
05-14-2009 09:17 AM
i couldn't find that specific example, anyway i tryed to run some example but they don't work cause missing dll and node.
i also tried to connect the power supply to the rs 232 directly to the microcontroller visa setting the address string ASRL1::INSTR the VI works without any problem but the measured waveform continues to be 0..it seems to be i can't connect with the instrument..
could you help me to figure out what can be the problem?
05-14-2009 12:06 PM
Hey Marla,
Referring to my email above, could you please let us know which software components you have installed. It is a slight concern that you do not have access to the example I pointed you to, as it should have been install along side some of these software components - the majority of which are required software. You will able to see all the NI software you have installed by expanding the software folder within MAX.
Also, when you say you are unable to connect to your instrument, do you mean the microcontroller or the 9870 serial module? Are you confident that you are able to correctly interact with the 9870 module?
It may be difficult to help you connect to the microcontroller without an indepth knowledge of the controller and the protocols and commands it is expecting. But I will endeavour to help you in any way I can.
Thanks for your time,
Best wishes,
05-14-2009 12:39 PM
i'm using labview 8.5.
i didn't find the Find Examples Pop-Up and when i try in the menu find an example in Hardware Input and Output there are example about writing and reading serial port.
anyway i connect the instrument directly to the cRio 9014 because there was an instrument already connected and working properly.
i attach both file (the one i set up for the microcontroller and the other file (for the instrument -spectroradiometer- connected into the controller) that was working.
05-15-2009 08:49 AM
Dear Marla,
I wanted to confirm one thing which is that if you are carrying out your serial communications via the 9870 module connected to your cRIO chassis you would need to implement FPGA code to interface with the module. The serial modules are not currently covered with “scan mode”, so you would need to write the FPGA code yourself. Furthermore, the code that you have is unlikely to run in FPGA – some of your vis (such as the visa configure) will not run on a FPGA target.
This is why I was keen on you seeing the 9870 example, as it illatrates how to correctly architect your application (both the RT and FPGA components). I have included a copy of the example project I mentioned in a previous post (please see Serial Loopback.zip). I have saved it back to 8.5 (from 8.6.1), so some of your driver software may prevent this from running, but you will be able to see how to architect your code – assuming you still wish to use the 9870 module.
Could I also enquire exactly which Kepco BOP you are using. Kepco seem to offer a range of similar bipolar operational power supplies, many of which have instrument drivers available for LabVIEW. You can see these in the instrument driver (ID) network on the National Instruments website.
http://sine.ni.com/idnetwork/main/p/sn/n25:IK.kepcoInc/pg/4
Ultimately, I think that it would be a good idea to test communication with the BOP from your development machine first - prototype code to run with the serial port on development machine before deploying to the cRIO.
Often the instrument drivers install with example applications. Perhaps you could try running one of these from the host machine (or you cRIO controller) to ensure that communications are running correctly.
See NI Example finder > Hardware Input and Output > instrument Drivers > LabVIEW Plug and Play.
Also, to clear something up, you mentioned in your first post that you wish to communicate with the Kepco BOP, but then you stated in your last post that you were communicating with a microcontroller. Are you still referring to the BOP?An important final question… do you need to carry out your serial communications with the 9870 module? Your last examples seem to be running with the serial port on the cRIO controller. Where is this code running – on the cRIO controller or on the host machine? If you could use this serial port, the second example file (testCompactRIO.zip) shows a piece of code which writes and reads from the serial port.
05-15-2009 08:51 AM