Announcement

Collapse
No announcement yet.

CSV ou text file reading on USB key

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sherwin4D
    commented on 's reply
    Glad you found an alternative solution.

    Best regards,
    Sherwin

  • Lorenz
    replied
    Hello Sherwin,

    Thanks for your help !! I found out that if the screen is not touched while the card is removed, there is no need to restart the screen as the programm works fine. I used the file_mount in the case the touch screen is touched : in that case, I wait for the uSD to be back and I then restart the screen.
    Works great !
    Thanks !

    Leave a comment:


  • sherwin4D
    replied
    Hi Lorenz,

    for exemple, to detect the uSD insertion and reboot the display ?
    If you have WS4 Pro License, you can attach this Genie Magic code in MainLoop to detect the opposite - when uSD card is not inserted. Please try to add this line of code:
    Code:
    //putstr("Mounting...\n");
    if (!(file_Mount()))
        while(!(file_Mount()))
             putstr("Drive not mounted...");
             pause(200);
             gfx_Cls();
             pause(200);
             SystemReset(); // reboot until uSD card is detected
        wend
    endif
    For more information regarding Genie Magic code, please refer to AN-00199 ViSi-Genie Magic Code Insertion Points. Kindly follow this link if you need to avail WS4 Pro License: https://4dsystems.com.au/products/so...kshop4-ide-pro

    Hope this helps.

    Kind regards,
    Sherwin
    Last edited by sherwin4D; 1 week ago.

    Leave a comment:


  • Lorenz
    replied
    Hello,

    I'm back with another question : reading from Usd file is working fine. The only issue is that I can not change de uSD card while the screen is running : by doing an under power uSD change over, all the graphical display is no more displayed (the programm stil running but without graphical elements ... which are store on the uSD ).
    Is there a possibility to avoid this problem ? (for exemple, to detect the uSD insertion and reboot the display ?)
    Thanks for your help.

    Leave a comment:


  • sherwin4D
    commented on 's reply
    You're very much welcome.

    BR,
    Sherwin

  • Lorenz
    replied
    Thanks for the tips Sherwin, I will have a look to those options !

    Leave a comment:


  • sherwin4D
    replied
    Hi,

    Glad you found an alternative solution to this.

    Given that you are developing your project under ViSi-Genie environment, perhaps you might find this appnote helpful:
    AN-00161 ViSi-Genie Magic How to Read a File

    Furthermore, if you have 4D Programming Cable and gen4-IB, or 4D-UPA, and/or uUSB-PA-II in your hardware setup, it is worth noting that you can actually transfer any type of file from PC to display module(without taking the uSD card out), and vice versa. Kindly check this forum thread for more information regarding the nifty File Transfer Tool:
    File Transfer over serial (Programming) cable Utility

    Hope this information helps.

    Kind regards,
    Sherwin
    Last edited by sherwin4D; 18 May 2020, 05:02 PM.

    Leave a comment:


  • Lorenz
    replied
    I think I will forget the USB key and use the uSD to store the text file (I will use a uSD extender to have an easy acces to the slot.
    The file reading is OK. (file_open and file_getC)

    Leave a comment:


  • Lorenz
    started a topic CSV ou text file reading on USB key

    CSV ou text file reading on USB key

    Hello,
    I am using Gen4-43DT alone with Visie Genie.
    I would need, for a customer, to be able to access data on a USB key (CSV or txt file format) or thru wireless communication with a PC.

    I don't know how handle this project ...Could you give advice ?

    Thanks for your help !
Working...
X