gazza29 Posted August 19, 2021 Report Posted August 19, 2021 hi have created 2 data tables but really struggling to write to them have watched the videos but still struggling help !!!!!!!!
MVP 2023 Flex727 Posted August 19, 2021 MVP 2023 Report Posted August 19, 2021 It would be most helpful to tell us which PLC you are using and what you are trying to do with the Data Tables.
gazza29 Posted August 19, 2021 Author Report Posted August 19, 2021 UN-USC-B5-B1 unilogics Want to record certain data from the ladder into my data tables temp time run load number user log in name log in log out times To be stored on SD card got date and time to work etc
MVP 2023 Flex727 Posted August 19, 2021 MVP 2023 Report Posted August 19, 2021 Moved to more appropriate forum. 1
MVP 2023 Flex727 Posted August 21, 2021 MVP 2023 Report Posted August 21, 2021 2 hours ago, Robin P said: What forum is that? The one you're in. 1
Dave Posted August 23, 2021 Report Posted August 23, 2021 Hard to help without seeing your logic so far, but here goes anyway.... The data types you are trying to write to the table must match the data types set-up in the Data Table columns struct. For the User name and login, logout times, you can use the event tags in the User Access Control struct to detect each time a user logs in or out. There will be some code required to save a "TimeStamp" to each event The instructions used differ, depending on the type of data table created. If you are using an indexed data table, the easiest way is to use the insert row instruction. The existing data gets pushed down a row and the new data writes to the row number defined in the instruction. If you always insert at row 0, the table acts much the same as a FIFO table, deleting the last row of data(first-in) once the table is full. To save the table's contents to SD card, use the Store DTI to File instruction. That instructions gives you some options such as whether to overwrite the file, append to the file, row # to start from and whether to create a .csv file, .csv-zip file, .udtf file or all types. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now