somachine basic fifo applications

samstrong

Member
Join Date
May 2011
Location
TURKEY
Posts
2
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 asked The Google its opinion about [somachine basic array fifo], and this was the first link:

https://download.schneider-electric.com/files?p_enDocType=Data+Bulletin&p_File_Name=8000DB1002.pdf


Which describes a FIFO, but does not show the code.


Many other links exist, including


this: https://download.schneider-electric.com/files?p_Doc_Ref=EIO0000001474&p_File_Ext=#M4.9.DSE00274771

explaining the ROL_ARR and ROR_ARR instructions, which would shift an array, and then you could write to position offset 0 (ROL_ARR) or 49 (ROR_ARR),


and this: http://www.plctalk.net/qanda/showthread.php?t=107638
 

Similar Topics

Hi all, I've been trying to develop modbus rtu program between uv balasts and plc ı'have 6 slave balast.I am reading fault run voltages etc...
Replies
0
Views
1,196
Hi Guys, I'm using M221(TM221CE24R) PLC and SoMachine Basic from Schneider and having a bit of problem. 1. I can't able to read the data from...
Replies
1
Views
1,747
Hello, I am new to plc programming. I am trying to program a flow meter (E&H promag 50) in somachine basic to achieve the following: 1...
Replies
5
Views
2,402
I downloaded SoMachine Basic, I'm looking to maybe use an M241 in an upcoming project. It seems that the basic vs, doesn't offer Tag based...
Replies
2
Views
3,053
Hello! I am new at PLC programming. I am using TM221CE16R PLC with TM3AI8 analog input module and SoMachine Basic v1.6. I am trying to scale...
Replies
8
Views
7,071
Back
Top Bottom