• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Msmax

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for your reply. For now I made a small utility which is loaded with a ShellExecute() command by button press on the screen. I can add the log file "source' directory as a parameter in the ShellExecute() command line, so I can use it for different projects. The file list box will show all available log files and the number of files found. After pressing the refresh button, it will show all available USB drives and enable the copy and remove button. Simple but does what I need it to do... copy all log files to a selected USB drive.
  2. My application writes a log file in a predefined directory. Filename is just date.txt. So for every day a new file is written with log data. The user can not switch to Windows Explorer to copy these files. I would like to have a popup where the user can select the inserted USB drive and just press copy or move, so the log files can be transferred to the USB. There should be no option to explore other area's on the hard disk of the computer, just select an output drive. Any idea's how to do this?
  3. Trying again to load my document in fullscreen and properly centered using some commands in script without any luck. The next commands does not work if used in a sequence: system.maximize() or system.fullscreen = 1 Have put them in a sequence. My document window is NOT maximized. When sequence is started manually in "Workspace tree" then I expected something should happen... but nothing at all. Did find a post describing the same but no solution was posted yet to this problem. Any tips how to use these commands in script?
  4. Ok. I get the first part... that is clear for me now. Will need 18.1 to test that. The second part is interesting.. MB_Status = MB_Faults + MB_FaultsAck*2 + MB_Fires*4 + MB_FiresAck*8+ MB_Inhibit*16 This will calculate all in 1 line without using counters, indexes etc.?? I can do this already with 17.1, this will save me a lot of time for sure. Only have to change 1 index in stead of 4 for each component. All arrays are the same size and the indexes do match. Thanks!
  5. OK.. then I have to forget evaluate. System must be fast responsive... don't want a slow system. Customer will not be happy!
  6. Please ignore the previous post... accidently pressed save. Complete post is below. Thanks for the explanation. I do not get all of it yet, but will definately play with the setup as you advise as soon I get some spare time. I discovered that the ComponentName is not a number and can not be used like this, but I was thinking to use define statement to assign a number to a tag same as the componentname. For example... At startup sequence: define L01D01 = 1 define L01D02 = 2 define L08D34 = 6 define L10D80 = 8 define L16D45 = 9 Now I would place some components on the screen and name them: component 1: L01D01 component 2: L01D02 component 3: L08D34 etc... The idea was to use in the component expression: x= evaluate(ComponentName) MB_Faults[x] + (MB_FaultsAck[x])*2 + MB_Fires[x]*4 + MB_FiresAck[x]*8+ MB_Inhibit[x]*16 Not sure if this will work. Have to install 18.1 to test this. I can not use the counting method because the name of the component, is the tag as used in the field and that is not in sequence. Later I would like to add display of the ComponentName in a popup text box when the mouse pointer is on top of the symbol. That would be very nice...
  7. Thanks for the explanation. I do not get all of it yet, but will definately play with the setup as you advise. I know that the ComponentName is not a number but I was thinking to use define statement to assign a number to the ComponentName. For example... At startup sequence: L01D01 = 1
  8. I had to troubleshoot scripts on a PC running runtime license. So I copied my Pro license from my laptop to the USB key and did the troubleshooting. Now I like to have the license back on my laptop so I do not have to plug in the USB key everytime, but I do not see an option for that. Hoe to get the license back again on my laptop?
  9. Hmm... I see that this was introduced in version 18.1 while I still use version 17.1. Can I upgrade WITHOUT any problems with existing CTL documents created with 17.1? Those applications are already installed and commissioned. Have to know if I can expect any troubles by upgrading to 18.1.
  10. Ok... not sure if I understand this right... If I create a user defined component, rename it to L01D01, and write in the Quick Sequence: ?"ComponentName: " ComponentName Then I expect to see the component name printed in the Command/Alert window if I click on the component... nothing printed. I expected to see: "ComponentName: L01D01" If I leave out the last word then "ComponentName:" is printed. Is this the right way to use ComponentName in a script within the component self?
  11. Thanks for your clear explanation. Think I was looking for ComponentName... I have created quite some user defined components which animates according bits set in several data registers filled via modbus read sequences. For each component I place on the screen I have to set the bit numbers (the "x" which refers to the index of the bit in the array) manually now which is very time consuming. MB_Faults[x] + (MB_FaultsAck[x])*2 + MB_Fires[x]*4 + MB_FiresAck[x]*8+ MB_Inhibit[x]*16 I assume I can replace the "x" by ComponentName in the script inside the component and load a file which assigns the correct bit number to the ComponentName in memory. Then my script does not have to change if I rename the components correctly. Some where at startup I will load the "x" values for the components: ComponentName = Value L01D01 = 1 L01D02 = 2 etc... Next part is script within the component for animation: MB_Faults[ComponentName] + (MB_FaultsAck[ComponentName])*2 + MB_Fires[ComponentName]*4 + MB_FiresAck[ComponentName]*8+ MB_Inhibit[ComponentName]*16 I will test this and if it does not work then I will make a small sample project to explain better what I'm looking for. The first project was more than 10.000 bits to assign... The one I'm working on now has more or less 2500 bits to assign...
  12. Need some help with using/accessing component names and variables in component expression. Is it possible to use a local var in a component expression? My own created symbol has an expression like: MB_Faults[x] + (MB_FaultsAck[x])*2 + MB_Fires[x]*4 + MB_FiresAck[x]*8+ MB_Inhibit[x]*16 Now I have to replace the "x" every time for every symbol with the index of the register, which is a lot of work if the component is used few hundred times. Would be great to use: private x = 770 MB_Faults[x] + (MB_FaultsAck[x])*2 + MB_Fires[x]*4 + MB_FiresAck[x]*8+ MB_Inhibit[x]*16 or even better if I can use the component name as reference: MB_Faults[MyName] + (MB_FaultsAck[MyName])*2 + MB_Fires[MyName]*4 + MB_FiresAck[MyName]*8+ MB_Inhibit[MyName]*16 Then I could load the values from a file. But is it possible to get the component name in the expression?