roghenr Posted October 21 Report Share Posted October 21 I tried to set up two separate tables, both with time and date strings. In my project I need to show the time and date when I start the process and also the time and date at the end of the process. I used the help and examples and got far but it doesn't work correctly. It would be nice if, for example, if the process does not start, the windows appear empty and as soon as it starts the time and day appear and only at the end the end time and date appear. I wasted hours on the project and it's difficult to understand the purpose of the tables I greatly appreciate your help. I speak English because I'm from Brazil and I use a translator Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted October 22 MVP 2022 Report Share Posted October 22 Unless you are keeping a log of all the recent start & stop times, you don't need to use Data Tables. Just store the start & stop times in MI vectors as a string using the RTC To ASCII FB. Then you can display the string or clear it out as desired. If you are keeping a log, then create a Data Table with 2 columns of String property and store the Date & Time at the appropriate moment with a Write Row FB. It's easy to keep the most recent value at the top of the Data Table with the Copy Rows function to copy all the rows down 1 either just before or just after your write. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted October 22 MVP 2022 Report Share Posted October 22 Keeping a log would look something like this: To display the data use the copy row to vector FB and display the appropriate addresses for the vectors. Quote Link to comment Share on other sites More sharing options...
roghenr Posted October 23 Author Report Share Posted October 23 On 21/10/2023 at 22:09, Flex727 said: Manter um registro seria mais ou menos assim: Para exibir os dados, use a linha de cópia para o vetor FB e exiba os endereços apropriados para os vetores. hello flex the data table write row 1 and 2 have different addresses Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted October 23 MVP 2022 Report Share Posted October 23 47 minutes ago, roghenr said: hello flex the data table write row 1 and 2 have different addresses I don't know what you mean by this. There is no problem with using multiple Data Table Write Row FBs, or having multiple Data Tables if it's easier. Quote Link to comment Share on other sites More sharing options...
roghenr Posted October 23 Author Report Share Posted October 23 1 hour ago, Flex727 said: Não sei o que você quer dizer com isso. Não há problema em usar vários FBs de linha de gravação de tabela de dados ou em ter várias tabelas de dados, se for mais fácil. 1 hour ago, Flex727 said: Não sei o que você quer dizer com isso. Não há problema em usar vários FBs de linha de gravação de tabela de dados ou em ter várias tabelas de dados, se for mais fácil. Good afternoon, I'll show you what I'm doing Quote Link to comment Share on other sites More sharing options...
roghenr Posted October 23 Author Report Share Posted October 23 Could you show the address you are using in the write rom, in fact I have difficulty understanding how to do a data table and I would like to learn how to make data history which is essential today Quote Link to comment Share on other sites More sharing options...
roghenr Posted October 23 Author Report Share Posted October 23 2 hours ago, Flex727 said: Não sei o que você quer dizer com isso. Não há problema em usar vários FBs de linha de gravação de tabela de dados ou em ter várias tabelas de dados, se for mais fácil. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted October 23 MVP 2022 Report Share Posted October 23 All of that in the last message looked exactly right to me. What problem remains? Quote Link to comment Share on other sites More sharing options...
roghenr Posted October 23 Author Report Share Posted October 23 58 minutes ago, Flex727 said: All of that in the last message looked exactly right to me. What problem remains? Flex I will redo it as you showed # only record the beginning time and date writes every time pulse key updates line zero but it doesn't update string know time is short but if you can help I would be grateful. I tried some examples, watched videos and it even worked, but not as it should. I'm kind of lost in addressing the write and read blocks in relation to reading the time and date clock Quote Link to comment Share on other sites More sharing options...
roghenr Posted October 23 Author Report Share Posted October 23 On 01/10/2023 at 18:43, kratmel said: Crie uma variável de temporizador na tela e selecione a opção necessária. 5 hours ago, Flex727 said: Não sei o que você quer dizer com isso. Não há problema em usar vários FBs de linha de gravação de tabela de dados ou em ter várias tabelas de dados, se for mais fácil. I initially did as you showed me to continue development Now I need to show finalized date and time values only when this occurs. It could show dashes, figure or nothing or maybe show zeros Quote Link to comment Share on other sites More sharing options...
roghenr Posted October 23 Author Report Share Posted October 23 3 hours ago, Flex727 said: Tudo isso na última mensagem parecia exatamente certo para mim. Que problema permanece? Now when you click to start recording, it erases the final recording Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted October 23 MVP 2022 Report Share Posted October 23 1 hour ago, roghenr said: No, MB 174 & MB 312 go in front of the Data Table Write Row FB. The RTC To ASCII FBs can just hang on the left rail to execute on every PLC scan. Attach your program file here and I'll look at it. Also, describe exactly what it is you want the program to do - something like: I would like to record the start & stop times for the last 10 events and display the most recent (or selected) event on the screen. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted October 24 MVP 2022 Report Share Posted October 24 I went ahead a wrote a little routine that should show you how to do some of the stuff you're wanting to do. I did this quickly without testing, so I likely made a few mistakes, but you should be able to get the concept. Let me know if you have questions. Data Table Help - BL.vlp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.