LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

help needed with CVI real time

Solved!
Go to solution

Hi,

 

I am new to CVI real time and need help related to this. I will explain my scenario:

 

1. I have few configuration files (INI). Need to validate the files (range checking..etc) during start of the application.

2. When user clicks "START" in the user interface on the host machine, I need to generate outputs (analogs/discretes...) based on the settings in the config file and read some inputs from other instruments. ( I/O tasks like generating outputs/reading inputs i am planning to perform in RT side)

3. From the user interface,  user can also change the config files. if user changes the files, again file validation needs to be performed. After changing the files, if user clicks START, need to take the newly enetered config files to perfom I/O tasks.

4. I am NOT using reflective memory for my application.

 

I am confused in the following area:

 

1. File validation during startup , do i have to perform on both host and RT side?????

2. if configuration files are changed in the host side by the user, how i have to send this latest file names to RT??? I think i should not send file names, i need to read from the file and its contents i need to pass to RT....Pls correct me , I am not sure about this....

3. If I have to send file contents to the RT, how I have to do that....means i have to use structures,..???

 

 

Please guide me. Any help would be highly appreciated.

 

Regards,

haari

 

0 Kudos
Message 1 of 2
(2,632 Views)
Solution
Accepted by topic author haari

Hey haari,


1. File validation during startup , do I have to perform on both host and RT side?????

This depends on the full range of responsibility for the INI files. If they are all needed simply to change what the I/O tasks are for, then you would technically only need to validate the INI file contents on the RT side. You could, however, validate on both sides if you wanted to. However, I would probably set it up such that I send a validation command to the target, have the target run a component of the code that validates the INI contents based on how I instructed it, and then return a message that says whether or not it met the requirements I specified. However, if you are concerned with offloading that process to the user desktop (instead weighing down the RT controller performance), you could FTP the file off of the controller and perform the validation process on the host side.

 


2. if configuration files are changed in the host side by the user, how i have to send this latest file names to RT??? I think i should not send file names, i need to read from the file and its contents i need to pass to RT....Pls correct me , I am not sure about this....

You can send them to the target over FTP. This can be done programmatically, through MAX, command window, or a Web browser.

 


3. If I have to send file contents to the RT, how I have to do that....means i have to use structures,..???


This is basically addressed in answer to question two. You would not need another structure in your RT code to handle the FTP receive component as this is handled by the FTP Client/Server communication. However, in the event that you successfully FTP a file to the target, you should likely send a message from the host to the target so that the target can respond accordingly and reload the file, reestablish the I/O values, run an idle procedure, or do whatever you like.

Hope this helps. Have a great day!

Tim A.
Message 2 of 2
(2,620 Views)