abacom-online.de

Das offizielle Elektronik-Software Forum
Aktuelle Zeit: Montag 20. November 2017, 16:03

Alle Zeiten sind UTC + 1 Stunde




Ein neues Thema erstellen Auf das Thema antworten  [ 18 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Table
BeitragVerfasst: Freitag 19. Oktober 2012, 22:22 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
HI I need to create a table, this table must be completed (with eg Volts, Amps, Capacity, date, batch) and pressing enter at the end of compiling the data to be acquired in 5 numeric input.
This and other tables that are compiled will then be stored before being called up in time of need without having to retype everything.
Thank you for your attention.


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Samstag 20. Oktober 2012, 09:29 
Offline

Registriert: Freitag 31. Oktober 2008, 14:59
Beiträge: 215
Millman,
one of many possibilities is presented here.
It makes use of LUTs.

1. you could make use of PLs integral LUT-function block (KT), which is a table that must be preset before you can run the PL application

2. the presented project makes use of a DLL which reads an external text file.
You have the freedom to edit the textfiles on the fly.

Be aware that the LUT result does interpolate between specified X-intervals.
It extrapolates if the file does not specify enough span.
In the project, the X indices in the files match the selector value exactly, so no interpolation occurs.
At least two pairs of [X;Y] values must be specified to form an interval.

You can add or delete value pairs on the fly by editing and saving the text file.
The pairs must be delimited (in the project by ";")

The directory must point to the textfiles, the textfiles must be present of course, the filenames must match these in the application.
The DLL is not thoroughly tested but operational; use it at your own risk.
As shown, you can use many instances of the same DLL, the can all share the same directory, or you can use structure of your choice.
You can specify several textfiles by means of a selector for a single DLL (by string multiplexer or by selector list) which is exemplarily shown in the project for the flour component.

The evaluation of the out_Y vs. X_in values is done in the DLL during a negative read-slope only (press the button).

Thomas


Dateianhänge:
LUT_1.ZIP [3.04 KiB]
307-mal heruntergeladen

_________________
Curiousity makes us progress !
Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Samstag 20. Oktober 2012, 13:17 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
Fantastic Tom are always accurate, but where can I find the DLL?
thanks


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Samstag 20. Oktober 2012, 15:03 
Offline

Registriert: Freitag 31. Oktober 2008, 14:59
Beiträge: 215
Hi all,

sorry,
here I go again - with DLL.

Thomas


Dateianhänge:
LUT_1.ZIP [81.25 KiB]
276-mal heruntergeladen

_________________
Curiousity makes us progress !
Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Samstag 20. Oktober 2012, 21:45 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
Tom, you have other ideas? I have to write on the tables of PL not in txt file and when I press send the data should fit in numeric input and saved to be recalled when we will need.
I hope you have other ideas
thanks so much


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Sonntag 21. Oktober 2012, 15:08 
Offline

Registriert: Freitag 31. Oktober 2008, 14:59
Beiträge: 215
Hi,

I did this for my own use, but share it with you, 'cause it could suit needs for others, too.

As you might have noticed, PL lacks from a table entry functionality.
So line by line or as in this case, string by string must be merged into some storage space somehow.
Using a file has the advantage of nonvolatile storage.

kPaul has created a DLL some time ago, called Stringspeicher, which is a string line-by-line-to-file-storer with the capability to edit the file to some extent (erase last line, reset file).
This suits well to my need.
If it should be necessary, the file can be edited externally on the fly ! Changes are reflected in the running PL application if the file is stored from a text editor.

In order to show the flexibility of mixed string/value capability, I have provided numeric and string readout fields.

I simply use RDline to peek out one line out of this file.
As kPauls DLL provides kind of 4-line browser, I have added some logic to autopeek a line which was browsed to. This allows to recall a previewed line without pressing an enter key. The peek line is entered after a delay, this allows to quickly browse through the lines without entering data too early.

Other potential application:
Of course the peeker could be used directly (by directly pointing to a line).
If a sequence of pointers was used to adress the file lines in sequence (in the RAM or ROM), kind of real value or string RAM could be realized by this.

The functionality description of Stringspeicher is found elsewhere in this forum; I have added kPauls help file here too.
I have limited its function to fixed max. line capacity (30000) and fixed date/time stamp enabled.
The strings are delimited with <space>. The filepath for Stringspeicher must be set to suit your needs.

The number of string entry "cells" is not limited, I have implemented an index plus 4 entries by now.
The PART function must be adapted, if more cells should be used, or if date/time fileds are altered.

Have fun.

Thomas


Dateianhänge:
LUT_2.ZIP [55.94 KiB]
283-mal heruntergeladen

_________________
Curiousity makes us progress !
Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Montag 22. Oktober 2012, 09:29 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
WoB is almost perfect, I just need to save to disk what I write in the tables, and then call the table capacity saved files.
here is the example
thank you very much


Dateianhänge:
2012-10-22_135439.jpg
2012-10-22_135439.jpg [ 25.18 KiB | 7742-mal betrachtet ]
Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Dienstag 23. Oktober 2012, 16:06 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
I need to save to disk directly from the text boxes and then retrieve the file from the text box capacity.
thank you


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Mittwoch 24. Oktober 2012, 09:08 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
I should also know that all files are stored in a single text file, however, recalled from the text box capacity with a style drop-down menu.


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Mittwoch 24. Oktober 2012, 09:32 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
What cha presented Tom would be fine because it adds strings to a txt file, but I can not fit my purpose.
When I add the lines in the browser and I select do not go as pour in the display.
I hope someone can help me out
thank you


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Mittwoch 24. Oktober 2012, 12:31 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
I solved with Lut2, I only have one problem: how come when I click on delete files I generate an error?
I thank all


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Donnerstag 25. Oktober 2012, 15:26 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
Thanks WoB is perfect, can you give me the lines of code you've written?
WoB you know how to convert from C # to C?
Last little problem the text box "Line number" you can connect with the text box capacity? eg: line 1 = 220 capacity line 2 = 330 capacity ........
Thanks again


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Freitag 26. Oktober 2012, 07:47 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
When I save, I need to do the search (recall) with the capacity table or batch.
I need to call the piece most easily as the line 1 ... 2 ... 3 does not tell me anything.
thanks


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Freitag 26. Oktober 2012, 15:45 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
I'll try thank you


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Sonntag 28. Oktober 2012, 12:17 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
Beautiful, just missing the ability to save to disk and then retrieve from the drop-down menu the capacity you need, I could use your dll.
Thank you for all WoB.


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Sonntag 28. Oktober 2012, 22:16 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
hopefully good :)


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Dienstag 30. Oktober 2012, 09:10 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
The research I can get capacity only or also for the batch and the date?
thanks


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Table
BeitragVerfasst: Dienstag 30. Oktober 2012, 17:06 
Offline

Registriert: Freitag 7. September 2012, 07:40
Beiträge: 35
Can you tell me how to remove the days of the week?

thanks


Dateianhänge:
2012-10-30_170145.jpg
2012-10-30_170145.jpg [ 82.62 KiB | 6819-mal betrachtet ]
Nach oben
 Profil  
 
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 18 Beiträge ] 

Alle Zeiten sind UTC + 1 Stunde


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste


Sie dürfen keine neuen Themen in diesem Forum erstellen.
Sie dürfen keine Antworten zu Themen in diesem Forum erstellen.
Sie dürfen Ihre Beiträge in diesem Forum nicht ändern.
Sie dürfen Ihre Beiträge in diesem Forum nicht löschen.
Sie dürfen keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Deutsche Übersetzung durch phpBB.de