Table

Dieser Bereich dient dem Austausch über geplante oder bereits realisierte Projekte - von Anwender zu Anwender.
Antworten
Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Table

Beitrag von Millman » Freitag 19. Oktober 2012, 22:22

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.

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

Re: Table

Beitrag von tom_g » Samstag 20. Oktober 2012, 09:29

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) 626-mal heruntergeladen
Curiousity makes us progress !

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Samstag 20. Oktober 2012, 13:17

Fantastic Tom are always accurate, but where can I find the DLL?
thanks

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

Re: Table

Beitrag von tom_g » Samstag 20. Oktober 2012, 15:03

Hi all,

sorry,
here I go again - with DLL.

Thomas
Dateianhänge
LUT_1.ZIP
(81.25 KiB) 559-mal heruntergeladen
Curiousity makes us progress !

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Samstag 20. Oktober 2012, 21:45

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

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

Re: Table

Beitrag von tom_g » Sonntag 21. Oktober 2012, 15:08

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) 587-mal heruntergeladen
Curiousity makes us progress !

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Montag 22. Oktober 2012, 09:29

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) 21150 mal betrachtet

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Dienstag 23. Oktober 2012, 16:06

I need to save to disk directly from the text boxes and then retrieve the file from the text box capacity.
thank you

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Mittwoch 24. Oktober 2012, 09:08

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.

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Mittwoch 24. Oktober 2012, 09:32

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

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Mittwoch 24. Oktober 2012, 12:31

I solved with Lut2, I only have one problem: how come when I click on delete files I generate an error?
I thank all

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Donnerstag 25. Oktober 2012, 15:26

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

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Freitag 26. Oktober 2012, 07:47

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

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Freitag 26. Oktober 2012, 15:45

I'll try thank you

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Sonntag 28. Oktober 2012, 12:17

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.

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Sonntag 28. Oktober 2012, 22:16

hopefully good :)

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Dienstag 30. Oktober 2012, 09:10

The research I can get capacity only or also for the batch and the date?
thanks

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Table

Beitrag von Millman » Dienstag 30. Oktober 2012, 17:06

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) 20219 mal betrachtet

Antworten

Zurück zu „PROFILAB Kundenprojekte und Aufgabenstellungen“