Jump to content

Recommended Posts

Posted

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 

 

 

Posted

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.

 

  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.