News:

  • October 16, 2026, 05:09:08 PM

Login with username, password and session length

Author Topic: SD card use in Sim  (Read 11321 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
SD card use in Sim
« on: August 30, 2021, 12:33:00 PM »
Would be handy to be able to have the Sim able to access media on the PC, whether it be an SD card, other drive, or possibly even a FAT32 partition on the hard drive.

No idea if that's possible, since the BRX has it own FS, to make it capable of dealing with Windows FS, assuming not.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: SD card use in Sim
« Reply #1 on: August 30, 2021, 12:51:19 PM »
Would be handy to be able to have the Sim able to access media on the PC, whether it be an SD card, other drive, or possibly even a FAT32 partition on the hard drive.

No idea if that's possible, since the BRX has it own FS, to make it capable of dealing with Windows FS, assuming not.

It does. The SDCard simulation is just a directory called SdCard that lives in the same directory as the sim executable.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: SD card use in Sim
« Reply #2 on: August 30, 2021, 12:58:46 PM »
It does. The SDCard simulation is just a directory called SdCard that lives in the same directory as the sim executable.

I started the Sim from within DMD, browsed the file system, selected SD as the FS, had all 0's in the file sizes and so on, which is probably the default state.   I tried to mount it, and it said it couldn't do that in the Sim (makes sense if it's just a subdirectory on an existing FS).     So when does "Mount" apply?   When installing a new card in a BRX?   When accessing an SD card in a real BRX via DMD?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: SD card use in Sim
« Reply #3 on: August 30, 2021, 01:03:14 PM »
I started the Sim from within DMD, browsed the file system, selected SD as the FS, had all 0's in the file sizes and so on, which is probably the default state.   I tried to mount it, and it said it couldn't do that in the Sim (makes sense if it's just a subdirectory on an existing FS).     So when does "Mount" apply?   When installing a new card in a BRX?   When accessing an SD card in a real BRX via DMD?

I have no idea what you are seeing. Mine looks just like the PLC. Starts empty, no files. That may be a bug in that simulator mode. Try running the sim as standalone then connecting.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: SD card use in Sim
« Reply #4 on: August 30, 2021, 01:08:54 PM »
I have no idea what you are seeing. Mine looks just like the PLC. Starts empty, no files. That may be a bug in that simulator mode. Try running the sim as standalone then connecting.

I think probably more like a bug in my operation of the file browser.    I think it's probably working OK, just doesn't need mounted.  I haven't actually tried creating any folders or files or writing to it.   If I have any issues with any of that, I'll post again.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: SD card use in Sim
« Reply #5 on: August 30, 2021, 01:13:29 PM »
The SD card in the PLC is completely under control of the PLC.  The "SD Card" on a PC has literally THOUSANDS of programs CHANGING THE SIZE AND FREE SPACE of the "SD Card", only one of which is the Simulator.  Hence, it does NOT maintain the free/used values (why you see 0's).

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: SD card use in Sim
« Reply #6 on: August 30, 2021, 02:04:05 PM »
I think probably more like a bug in my operation of the file browser.    I think it's probably working OK, just doesn't need mounted.  I haven't actually tried creating any folders or files or writing to it.   If I have any issues with any of that, I'll post again.

Oh, yeah. It can't be mounted because it can't ever be unmounted. When you said zero files, I envisioned a directory full of zero length files.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: SD card use in Sim
« Reply #7 on: August 30, 2021, 02:37:46 PM »
Yeah, I created a FILELOG, and it works exactly as expected.   Thanks!   :)
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.