cmu90 - 2020-09-22

Hello!

I'm currently working on a project which have lead to a few headaches, hopefully some kind soul(s) can help me out!

I am getting data from a laser which fills up an array spot once pr 500ms, from index [0] to [x].

That data needs to be logged to 3'rd party software, but the process in that software uses a trigger which is limited to once pr second.

My question is; how do I "move" the value from the array to an variable on a 1sec timer without missing an spot in the array.

Fingers crossed!

Writing the "Value_Diff" to the Array:

IF R_SLAG_OK THEN
F_FIFO_WRITE(cbData := SIZEOF(Value_Diff),
pData := ADR(Value_Diff),
cbBuffer := SIZEOF(arrLaserValueHistory),
pBuffer := ADR(arrLaserValueHistory)
);
END_IF

Thank you in advance, have a great day!

 

Last edit: cmu90 2020-09-22