04-15-2019 09:12 AM
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
Solved! Go to Solution.
04-15-2019 01:43 PM
Hey there,
Check out here for file path info on RT targets: http://www.ni.com/tutorial/14669/en/
As far as your other question, the stimulus profiles are deployed to the RT target based on the first paragraph here: http://zone.ni.com/reference/en-XX/help/372846H-01/veristand/creating_rt_sequences/
The real time sequence communicates back to the host to display it's current state. See the second to last paragraph here: http://www.ni.com/en-us/innovations/white-papers/11/creating-real-time-stimulus-profiles-in-ni-veris...
Hope this answers your questions
Best,
JHP
04-16-2019 04:15 AM - edited 04-16-2019 04:16 AM
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
04-16-2019 09:28 AM
forgot to mention its a PhaLap target that I am deploying too
04-16-2019 04:32 PM
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!
04-17-2019 06:44 AM - edited 04-17-2019 06:45 AM
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
04-24-2019 04:00 PM
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 🙂