i work with these function.
it's works fine.
i read from file the automatic sequence number.
Do you have any tips on how to use it, what is the requested inputs, where should the file be stored etc.
as far as I know, ReadFromFile has 2 arguments:
- the first is the reading trigger. Each time this parameter is changing state (True/false) a new value will be read from the file
- the second argument auto_on should be true.
that fuinction returns the next value read from the file.
Value = ReadFromFile (FlipFlop, Auto_on).
The file name should be Test.txt and should be located in the tmp dir in the drive where the data is. it should contain 1 value per line.
thank you for a good explanation.
So the function will automatically read from the next line in the file if I understand you correcty.
Must be convenient to use a rising edge as reading trigger, for example when station cycle is finished - resulting in a new order being read for each cycle.
unfortunately rising edge will not work as expected. a new value us read when changing from False to True and from True to false.
so I created a FlipFlop parameter that changes state at each rising edge of a siganl. That worked fine.
late reply. I increased the integer each time the cycle finished resulting in reading of the file working as expected.
Thanks for your assistance.