Jump to content

Annatooli

Members
  • Posts

    31
  • Joined

  • Last visited

Posts posted by Annatooli

  1. I think what @Swervomotor means is if you look "Solution Explorer" - "SD Management". Default file limit there is 32. It is not SD card limitation it is Unilogic, who offers you delete older files so your SD card  wont  become full. 

    You are correct it wont work like that. I did managed to make my own tests and I got errors "-6: Write file error".

    I do understand why those sub folders may be useful. I have 3 tables what I store regularly on my SD card and with month I have there 200-300 CSV files plus sig files for each of them. Total size of files is just 3 MB so my 2GB card can save logs for next 50 years, but all those files are crammed in one folder ...

    Anatoly

  2. Hi,

    Actually there is no dedicated "make directory" functions in Unistream,  there aren't even way to move file from one SD folder to  other SD folder with ladder.

    Since Unistream works on Linux, you MAYBE can create folders, if you construct file name and add "/" as folder separators. You may try "Store DTI to File" with filenames like  "2020/07/31/archive" you may also try "./2020/07/31/archive" as file name. But it may not work. 

    From my own experience you can not include characters like "space" in file name. 

    Anatoly

     

     

     

  3. Is there way to convert STRING-ASCII to STRING-UTF16. 

    I have data table with UTF-16 column for messages, but in one case I want to add number there, but number is in ASCII. Maybe someone knows some existing method for this kind of conversion ?

    I can probably create this function, but is UniLogic internally "Little endian" or "Big endian" ?

    Anatoly

     

  4. I wanted to provide support personal way to access alarm history. So when user calls at 2 AM and says "machine stopped working" they can see what has happened and give advice for user, what to do. Sadly in current state you cant provide any indication of alarms on Web page. I know they can see errors on HMI screen. But If I provide support personal VNC access they are able to start engines over cell phones (in their bed) and I think it may be dangerous. Providing read-only VNC access  is also problematic, because PLC is behind locked door (windowed) and for interactions they have to drive on the job site. 

    I can provide state of the buttons or sensors on web page but there are lifting device and it will stop if it is over loaded (speed drops).  Without alarms you cant easily see reason why it stopped.

    Maybe I can read alarms from SD card and show them on Web Page ? Maybe I can add some JS code and create some custom Web UI elements?

    UniLogic 1.29.111

  5. On 5/14/2018 at 3:49 AM, Joe Tauser said:

    I should have explained what a .rar file is.  For future reference, a file with a .rar extension is a compressed file, typically used by hardcore programmers to toss Unix (or Linux) filesets around.  It a more efficient compression algorithm but not seen as often on the web as a .zip file.

    As shown by your screenshots, Windows acts dumb when it sees one.  Microsoft knows damn well what they are but I have a feeling because they are so popular with the Linux community that there was a conscious decision made by the Windows development team to not include in the default supported file extensions.

    Keep up your efforts! 

    Joe T.

    It is old post but .rar files are actually from DOS and BBS era and they are still popular in file sharing  and archiving.  Microsoft wont include support because rar format is closed source when zip format is very much open source. So they wont have to pay some 3rd party. 

    Rar file format compared with zip format has been very stable over the years. In late 90s and beginning of 2000s there were some "Special" versions from zip what may still be incompatible. But you can read all rar files even when they are from 90s.

    Common format from Linux (unix) is .tar and its compressed extensions (.tar.z / .tar.gz) it stores unix specific file permissions also into archive. Today it is common to use zip and rar in linux when there is no need to keep file permissions.  For Linux there is also 7z available. 

    Anatoly

  6. Your example is almost exact copy from example provided by Unitronics. except MI 2040 is MI 0 there.

    Usually what happens is user turns off one of PLCs and after that all system has to be turned off and on again. It wont happen often, maybe 2-3 times a year, but all pointing finger to me. So I have to find solution.

    Like you understand if MI 2040 turns 1 - no communication, after that point. I can change MI 2040 back to 0 and all wakes up, but maybe It can  by done using some SI's or SB's.

    Anatoly

  7. In Examples there is UniCAN example "UniCAN for CanBus between masters" and it does work.

    But there is MI 0 what stores  UniCAN Send Status, problem happens when it turns 1 "network is busy". After that, no communication. Only way to restore communication is PLC OFF and ON cycle.

    I wonder maybe there is some little less destructive way to understand when communications can be restored ? Maybe use some SB's or SI's ? 

  8. Maybe there is problem with my functions

    One liner for swapping words

    static void Swap_Bytes(unsigned int input, volatile unsigned int* result)
    {
    	// User code starts below this comment
    	 *result = (unsigned int) ((input&0xffff0000)>>16) | ((input&0xffff)<<16);
    	// User code ends above this comment
    }

    Thanks to @Saragani I was able to write this simple function for rising just one output in array.

    static void Set_one_Bit_in_Array(volatile unsigned char* Arr, int ArrLen, unsigned char index)
    {
    	// User code starts below this comment
    	int ndx = (int) index;
    	
    	for (int i=0; i < ArrLen; i++){
    		if (i == ndx){
    			Arr[i] = 1; // true
    		}else{
    			Arr[i] = 0; // false
    		}
    	}
    	// User code ends above this comment
    }

    So these are my functions I cant tell what is wrong with them ?

  9. Certainly I don't have top notch PCs. 5th and 6th gen Intel i7, drives are Samsung 860 and 970 1TB.  Both has 16 GB RAM. One of them is water cooled, so yeah not top notch, but maybe they still manage to run Unilogic some how?

    My windows install is minimal for running some windows specific programs like Unilogic. My main desktop is on Linux. 

  10. I have some simple C functions, but suddenly I noticed all code is gone and functions are displayed as empty. I was worried, did I accidentally delete some of it, but luckily I have older versions so I opened these and copied content into notepad. But when I reopened newer file (file where c functions were empty) all content was back. I even saved newer file before opening older file.

    So conclusion - C functions window displayed functions as empty, even when content actually did exists there.

  11. Currently it is too hard if you have to change multiple object colors on HMI.

    I had 20+ Numeric Box and Fixed Text objects on screen and customer says they want to change entire color scheme similar for their brand colors.  I didn't find any easy way to automate things so it is 20 clicks and button presses for each element color and I didn't had only one page. :(

    Maybe Copy/Paste drop down for color elements on the Properties Window ??

×
×
  • Create New...