NI Home > Community > NI Discussion Forums

Machine Control

Showing results for 
Search instead for 
Do you mean 
Reply
Member
Doug_S
Posts: 37
0 Kudos

Simple Tank Control Reference Application

[ Edited ]
Post your questions or feedback on the Simple Tank Control Reference Application of the Local Machine Control Reference Architecture here.
Message Edited by Christian L on 07-31-2009 04:23 PM
Member
KeanYuen
Posts: 2
0 Kudos

Re: A Reference Application for Local Machine Control

Hi Doug,

I would like to find out is there a way to run the simple tank demo "MC Tank Demo.lvproj" without connecting to a cRIO controller? Meaning running in simulation. If this is possible, can you teach me how to do it?

If this is not possible, may I know can this example code be run without using the exact same module? I replaced the NI-9205 with NI-9215, so the number of channel used in the original FPGA code is reduced to only 4. However, after I successfully compiled both the cie_FPGA IO and cie_FPGA Get Calibration files, I could not run the cRIO IO Engine (CIE).vi.

The reason this VI is not able to run is because the CIE functions used in this VI are all not executable due to broken arrow. I went into these function and try to manually select the FPGA Bitfiles. Unfortunately, only the cie_FPGA Get Calibration.lvbit file is successfully added into the block diagram. The other bitfile (cie_FPGA IO.lvbit) is still having a broken arrow. The error message is shown in the attachment "error.jpg".

I am suspecting the error is due to the number of AI channel being reduced when using NI-9215 instead of the NI-9205. Please correct me if I am wrong.

I would appreciate if you can send me some steps guide on how to run this example code because the resources found on the website seems alittle bit insufficient.

Looking forward to hear from you again. Thank you.

 

Best regards,

Kean Yuen

Active Participant
Christian_L
Posts: 663
0 Kudos

Re: A Reference Application for Local Machine Control

[ Edited ]


KeanYuen wrote:

Hi Doug,

I would like to find out is there a way to run the simple tank demo "MC Tank Demo.lvproj" without connecting to a cRIO controller? Meaning running in simulation. If this is possible, can you teach me how to do it?


Kean,
 
You can run the Tank Demo without having a cRIO present by running both the controller code and the HMI code on the same machine. If you have an HMI touch panel computer or two different Windows computers (with network connection) available you can run each of these pieces on two separate targets.
 
To run everything on one Windows development machine follow these steps:
 
  1. Open the MC Tank Demo project.
  2. In the project copy the MC Tank Demo without IO.vi example from the RT target to the Windows target. You can do this my holding down the control key on your keyboard and then click-dragging the VI from the cRIO Controller target to the My Computer target. You should now have the VI listed in both targets.
  3. Open MC Tank Demo without IO.vi in the My Computer target.
  4. On the diagram of MC Tank Demo without IO.vi a Path constant is used to identify the location of the tag configuration file (MCTankDemo without IO.tcf). Update the value of the constant to point at this file located in the same directory as the VI on your hard drive. Right click on the constant and select Browse for Path... to do this.
  5. Run the VI. If the file is found correctly by the VI, the CVT Tag List indicator on the front panel will show the list of tags used by the application (Fill Valve, Fill Valve Manual, Drain Valve, ...)
  6. Open the HMI example (MC Tank Demo HMI NavigationEngine without IO.vi) in the My Computer target.
  7. Update the value of the path control on the front panel to point at the tag configuration file for the HMI code (MCTankDemo Host Tags without IO.tcf). This is located in the same folder as the HMI code VI.
  8. On the front panel set the Target IP Address to 'localhost' or 127.0.0.1
  9. Run the HMI VI. It should connect immediately to the controller code already running on your computer and show the application HMI.
  10. You can operate the HMI by pressing the buttons across the bottom of the HMI screen. On the MAchine Control page press the Start process button to start the automated tank process.


Message Edited by Christian L on 07-15-2008 06:07 PM
Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Member
GiridharYadav
Posts: 38
0 Kudos

Re: Simple Tank Control Reference Application

Dear Sir,

 

I am in need of a simple tank control reference example throguh which I can do some modifications and use the same to one of my application. I had tried in the developer zone but it is compatible with LabVIEW 2009. But I do have LabVIEW, RT and FPGA of 8.5 version. So, in this regard I request you to help me out by providing the example with 8.5 version compatible.

 

 

Thanks and Regards

Giridhar

Engineer

I-Design. 

Member
Daniel_E
Posts: 124
0 Kudos

Re: Simple Tank Control Reference Application

Hey Giridhar,

 

Please find the example attached.  You should be able to open and modify the code in LabVIEW 8.5.  I was able to get all the reference libraries to revert to 8.5 without any issue.  This is because this example doesn't use the CIE.

 

I hope this helps!

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
Member
GiridharYadav
Posts: 38
0 Kudos

Re: Simple Tank Control Reference Application

Dear Daniel,

Thank you very much.
Member
NI-hilator
Posts: 99
0 Kudos

Re: Simple Tank Control Reference Application

I downloaded and installed mcatank_203_intaller.zip and all the relevant additional libraries. When I open the project I get a confict for the CVT library.  In trying to resolve other issues, I may have downloaded the CVT library from more than one source. Can you tell me if the CVT library belongs in the user.lib or the vi.lib?

 

Thanks!

 

Active Participant
Christian_L
Posts: 663
0 Kudos

Re: Simple Tank Control Reference Application

The CVT should be installed in user.lib.

 

The version that is installed in vi.lib was installed by an improperly configured VI package. In VIPM uninstall 'Reference Library for Current Value Table (CVT)'.

 

 

 

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Member
NI-hilator
Posts: 99
0 Kudos

Re: Simple Tank Control Reference Application

I don't see any explicit hardware requirements.  Would this run on a 9073?  Also, is there any plan to update this to run in scan mode?


Thanks!

Active Participant
Christian_L
Posts: 663
0 Kudos

Re: Simple Tank Control Reference Application

This example uses simulated I/O so it should run on any RT target including the 9073.

 

We have no immediate plans to update this example, but it should be easy to extend it for real I/O using the scan engine. You may consider using the cRIO I/O Engine (CIE) library for this purpose. The CIE is a ready-made component that takes data from ScanEngine and passes it into the CVT. This would be the logical extension for this example if you want to add physical I/O.

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense