hello eveyrone
I want to make an application with M221 PLC in SOMACHINE BASIC program. I request your valuable help.
I have a 50 ms pulse signal.
I have one analog input.
I want to save the value from this analog input as FIFO in the data range of 50 words whenever pulse signal comes.
When 50th data is filled and a new pulse comes, delete 50th data and let 49th data be written to 50.
So in summary, when each pulse comes, the data will be written to the next address.
1. When PULSE comes, let's assume that the analog input value is 15.
MW100 = 15
MW102 = 0
MW103 = 0
I
I
I
MW149 = 0
2. When PULSE comes, let's assume that the analog input value is 20.
MW100 = 20
MW102 = 15
MW103 = 0
I
I
I
MW149 = 0
3. When PULSE comes, let's assume that the analog input value is 17.
MW100 = 17
MW102 = 20
MW103 = 15
I
I
I
MW149 = 0
And it will continue like this. Continuous data will move to the next address.
I want to make an application with M221 PLC in SOMACHINE BASIC program. I request your valuable help.
I have a 50 ms pulse signal.
I have one analog input.
I want to save the value from this analog input as FIFO in the data range of 50 words whenever pulse signal comes.
When 50th data is filled and a new pulse comes, delete 50th data and let 49th data be written to 50.
So in summary, when each pulse comes, the data will be written to the next address.
1. When PULSE comes, let's assume that the analog input value is 15.
MW100 = 15
MW102 = 0
MW103 = 0
I
I
I
MW149 = 0
2. When PULSE comes, let's assume that the analog input value is 20.
MW100 = 20
MW102 = 15
MW103 = 0
I
I
I
MW149 = 0
3. When PULSE comes, let's assume that the analog input value is 17.
MW100 = 17
MW102 = 20
MW103 = 15
I
I
I
MW149 = 0
And it will continue like this. Continuous data will move to the next address.