Process data sql table view function issue

BackGround, i have an assembly line, that have many different function machine. Every machine have Key parameter, i store the key data to SQL database every second.


i actually want to use view to combine these two table, but i found the timestamp in the sql after second , there are still have 3 number as the following picture shows, so i am not able to use the sql view due to if i decrease the Process B timestamp by 30s it will perfect match with the process A timestamp.

image

currently i first store the data to a history database as a temp solution , then use scripting to read the data and use transction to SQL server finally, but it will make the a lot of cpu and memory and hard disk . is there any solution to solve this problem ?

Timestamps are accurate to milliseconds. Also, using time to tie production on one cell to production on another cell is a terrible idea, as any fluctuation in line speed (including by stoppages) will break your calculation. Plus any rounding issues when timestamps fall close to the 0 millisecond mark.

Use a unique id that follows the product from cell to cell (a re-usable pallet fixture ID, perhaps) and join in SQL with that.

1 Like

Dear Sir i following your advise , and simulate success, thanks a lot



i create 2 transaction in ignition and use the TSID(a unique id what you suggest me),after the data is stored

i create view in the sql server side


Finally i can combine these two transaction table together.

1 Like