VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

2 Parter: 1) with system running RT target, how to address files on the RT after placing them in the main drive of the RT using webdav 2) general question regarding how sequences run and behaviour during loss of comms between target and host

Solved!
Go to solution

Firstly apologies for the lengthy title 

 

So I have a RTOS on a windows PC and I have used webdav to place files on the main C drive of the which are then to be referenced by some custom devices which have inputs on their main pages to point at the file locations.  I have been developing the system in windows until  and want to transfer over to my pharlap system, I have tried using the dir C:/FolderName/FileName which is the directory as i would see it in regards to the target itself, its mapped on the host as Z drive but im not sure whether i should be referencing Z or C now that the custom devices are on the target.

 

Secondly, i intend to be running some rather critical sequences with the system and have some general questions about how sequences execute during runtime on an RT target, the confusion that I'm having is based around the fact that the stimulus profile appears to run on the host, when using an RT target does this then run on the target because I'd imagine if this has to communicate with the host during runtime this would interfere with the determinism of the system.  Should a comms failure between the host and target occur during a sequence what would happen? would the sequence continue?  And what are best practices for handling this situation?

 

Thanks for your time in advance

0 Kudos
Message 1 of 7
(3,769 Views)

Hey there,

 

Check out here for file path info on RT targets: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YH93CAG&l=en-US

 

As far as your other question, the stimulus profiles are deployed to the RT target based on the first paragraph here: https://www.ni.com/docs/en-US/bundle/veristand/page/create-real-time-sequence.html

 

The real time sequence communicates back to the host to display it's current state. See the second to last paragraph here: https://www.ni.com/en/shop/data-acquisition-and-control/application-software-for-data-acquisition-an...

 

Hope this answers your questions

 

Best,

JHP

Message 2 of 7
(3,755 Views)

Thanks very much for the reply,

 

in regards to the sequences thats brilliant, thanks, just needed some reassurance in what i was doing 

 

however in regards to the addressing files that I have saved on the RT im still having difficulties, you'll see from the pic RTdir, i have used webdav to map the RT target to my PC as a network drive (Z) and placed a new folder in the RT's drive called Profiles where I've saved the files that I am using with custom devices.  The file directory is saved as a custom device property which can be changed from the main page as shown in the pic CD file path, now I've tried addressing this as C:\Profiles\filename as the first article implies should work, I've also tried it with Z instead of C just to see if that would work, it didnt, no surprises there.  When I deploy to the target, i get the error shown in the pic err, which says the file path does not exist however it does exist if when deploying the system is looking for files from the targets perspective instead of from the hosts perspective 

 

not too sure on how to proceed any help would be appreciated

Download All
0 Kudos
Message 3 of 7
(3,733 Views)
Solution
Accepted by topic author ecleary42

Hey,

the path to your files on the RT target will be most likely something like "c:\ni-rt\system\..." or "c:\ni-rt\DavWWWRoot\...". I think I've never used WebDAV as long as you can simply use FTP or SMB to easily access your files on Pharlap.

But I am pretty sure you're disigning very awkward workflow for your Custom Device (CD) if moving files manually to the RT Target will be a must to make it up a running.

 I think selecting working *.tdms file in CD configuration on the Host PC is absolutely correct but the next step should be (ideally) to extend your CD with an On Compile Action VI which will collect all dependencies (aka your *.tdms file(s) ) and attach them to the compilled version of the SDF and transfer it to the RT target during the deployment process - here you have full control over the destination directory so you can easily determine the right path for the RT Driver of your CD.

I recommend you to read thru the NI VeriStand Custom Device Developer's Guide and focus on action VI's section and use of "Add Custom Device Dependencies" function described on page 55.

 

BTW: you can also learn a lot from reverse-engineering of the existing custom devices which are available on GitHub: VeriStand Open Source Add-Ons. Most of them do have some On Compile Action VI. You can check out how it is implementend in the main CD's XML file as well as how it collects dependencies and often rephrases CD properties to be easily accesible in the init/start section of the RT Driver...

 

Good luck!

CLA, CTA, CLED
0 Kudos
Message 5 of 7
(3,708 Views)

Thanks,

 

wasnt aware of using a compile on action VI, sounds like to go, Ill go down that route and report back on progress 

 

thanks the advice duly noted

0 Kudos
Message 6 of 7
(3,704 Views)

Thanks for the advice okubik, had a wee rummage through some other peoples code and another look over the Devs guide, managed to get the CD's to work the way that i was trying to do it originally but it was suggestion that lead me to look at the issue in a new light and thus fix it, so thank you very much.  Trying to keep the CD's as simple as possible to allow for easier updates and readability for now.

 

The files are never going to move but they will be overwritten over webdav before running a profile, so this technique should be ok for its purpose 🙂 

 

  

0 Kudos
Message 7 of 7
(3,673 Views)