LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO 9012 USB fix drive letter

Hello All!
I am using cRIO 9012 controller with 9102 chasis along with NI 9802 and IO modules in a system. I am logging data on SD cards and on USB drive connected with controller via USB port. I am using cRIO 2.4. Is there any possibility so that whenever I connect a USB drive to the controller and controller will assign a fix Drive  Letter say U without  taking into account that the NI 9802 SD cards are mounted or not. The problem is when I start the application.


Regards
Mani
Message 1 of 13
(4,714 Views)

Manigreatus wrote:
Is there any possibility so that whenever I connect a USB drive to the controller and controller will assign a fix Drive  Letter say U without  taking into account that the NI 9802 SD cards are mounted or not. .


In the current implemenation for Mounting SD Cards and the USB port there is not a way to force the USB port to use Driver U if the application has already Mounted SD Cards from Real-Time.
 
However, assuming the USB is plugged in all the time you should always get the U drive as mountings happens on boot as well as insertion.  As you noticed, the only case where you wouldn't get U for the USB drive is if you called RT Mount on an SD card before you plugged in the USB. If always having the USB stick present before mounting SD Cards is not possible, then the only workaround that comes to mind is if you always reboot after you change the USB then the USB should always get U.
 
In the meantime, I've filed Corrective Action Request for this behavior with ID #121831 for a solution to be investigated for future releases.
 
If you can help explain how your using both the USB and SD cards from RT we might be able to determine other software work arounds for you.
 
Thanks,
 
Basset Hound
Message 2 of 13
(4,690 Views)
Hi
Thanx Mr. Basset Hound
But it was already cleared to me that rebooting is a remedy after each connection.
My system will work as a stand alone and acpuire n log data for months then after this it will be connected to xp machine so that the files can be accessed i am using FTP. But  I think rebooting is alright.


Regards
Mani
0 Kudos
Message 3 of 13
(4,681 Views)
Dear Mr. Hound

I have encountered a new problem. When I stop the vi delibrately(without unmouting SD cards) while the SD cards are mounted, and then run again the same vi, then the mount cards gives an error to  run chkdsk.  For removing  this error I need to  put out the  SD  cards from the module and then format them and then run chkdsk and put in the cards again then the mount cards work. It works properly if unmount is done after each mount. When I target this vi on cRIO for running as startup then this works only for the first boot of cRIO but not afterwords. Please help me resolve this problem. when I stop the vi from the control I put it unmount the cards properly then stops but how can I do this thing with embedded vi because it can be unplugged any time.

Best Regards
Mani
0 Kudos
Message 4 of 13
(4,667 Views)
Is the System powered off during any time?  Any chance you can provide a small RT VI that can reproduce this behavior?
 
Thanks,
 
Bassett Hound
0 Kudos
Message 5 of 13
(4,647 Views)
Of course it could be stopped any time since there is also a USB connection that can be unplugged. Is there any possibility so that this error(that comes out while mounting SD cards that were not unmounted) can be removed programatically. Plz give me that small RT vi details.

Regards
Mani
0 Kudos
Message 6 of 13
(4,634 Views)
Hello
I am also using shared variables on the same system but these network published shared variables are not visible on other machines when cRIO is running as a standalone system.
Please help me these variables work  properly when I  target from project explorer but not work when run as startup.



Regards
Mani
0 Kudos
Message 7 of 13
(4,618 Views)


Manigreatus wrote:
Of course it could be stopped any time since there is also a USB connection that can be unplugged. Is there any possibility so that this error(that comes out while mounting SD cards that were not unmounted) can be removed programatically. Plz give me that small RT vi details.

I'm sorry, I was asking if you could provide the RT VI so that I could see if I could reproduce the same behavior your seeing.  There is not a way to programatically change the Method so it does not error out in this case if it believes the error is needed without modification to the internal code.
 
Basset Hound
0 Kudos
Message 8 of 13
(4,610 Views)
Hi

Here is the sample vi attached, I have solved the problem by using the user 1 switch on the controller. But the problem happens again if a power failure occurs which is likely to happen.

Regards
Mani
Message 9 of 13
(4,582 Views)
Thanks for the VI Mangus,
 
From investigating the behavior, I'll help describe what is happening with your system to give a better understanding.  When power is cut at some future time, anything thats using a FAT file system can and does become corrupt if its not properly shut down.  So, as you have seen, when your application loses power, if the SD cards have not been un-mounted properly, then when we attempt to mount the Card, the software sees that the FAT file system has become corrupt and requires a run of chkdsk to recover it before we can mount again.
 
Now, this is different than some other OS versions, as others (Windows, etc.) are more lenient on the mount side.  There are lots of minor corruptions that they are lenient enough to mount anyway.  NI had an explicit desire to be strict and not lenient in these cases as if we mount filesystems that are corrupt in this way we might be overwriting any data that your application may have generated.  So, currently, a proper system should have a way to provide a safe shut down procedure so that File IO can have time to close and un-mount the SD card.  This could be done with an external battery on the input and monitoring on the RT controller on which Power Suppy Input is being used.  See the Tutorial Designing High Availability Systems with CompactRIO and Compact FieldPoint for some more information on this subject.
 
We have considered providing a method to explicitly Mount and SD card even though its a little bit corrupt so please file a product suggestion if you would like to see this feature.
 
Let me know if you have any questions.
 
Thanks,
 
Basset Hound
 
 
 
 
0 Kudos
Message 10 of 13
(4,531 Views)