Skip to content
Snippets Groups Projects
Commit 536277e2 authored by Cristian Galperti's avatar Cristian Galperti
Browse files

towards MDSWriters inclusion in cfs1and2 1 thread

parent dbb51b61
No related branches found
No related tags found
No related merge requests found
......@@ -100,8 +100,8 @@ genbusflatstub1('input2flatddb2.cfg',cfs2inputbusflat,'DDB2');
genbusflatstub1('output1flatddb1.cfg',cfs1outputbusflat,'DDB1');
genbusflatstub1('output2flatddb2.cfg',cfs2outputbusflat,'DDB2');
genbusflatstub1('output1flatmds1.cfg',cfs1outputbusflat,'MDSWriter_0');
genbusflatstub1('output2flatmds1.cfg',cfs2outputbusflat,'MDSWriter_0');
genbusflatstub1('output1flatmds1.cfg',cfs1outputbusflat,'MDSWriter_1');
genbusflatstub1('output2flatmds1.cfg',cfs2outputbusflat,'MDSWriter_2');
% bus=Simulink.data.evalinGlobal('algo_cfs1','algo_cfs12_procin');
% cfsprocinbusflat=genbusstructstub('PROCINBUSDDB1STRUCT.cfg',bus,'proc_in','DDB1');
......@@ -222,10 +222,10 @@ system('sed -i -e "/>OUTPUTBUSFLATMDS</r storagebroker2.cfg" -e "/>OUTPUTBUSFLAT
system('sed -i -e "/>MDSWAVEGEN1</r mdswavegen1.cfg" -e "/>MDSWAVEGEN1</d" algo_cfs1and2.cfg');
system('sed -i -e "/>MDSWAVEGEN2</r mdswavegen2.cfg" -e "/>MDSWAVEGEN2</d" algo_cfs1and2.cfg');
% system('sed -i -e "/>OUTPUTBUSFLAT1</r output1flatddb1.cfg" -e "/>OUTPUTBUSFLAT1</d" algo_cfs1and2.cfg');
% system('sed -i -e "/>OUTPUTBUSFLAT2</r output2flatddb2.cfg" -e "/>OUTPUTBUSFLAT2</d" algo_cfs1and2.cfg');
% system('sed -i -e "/>OUTPUTBUSFLATMDS1</r output1flatmds1.cfg" -e "/>OUTPUTBUSFLATMDS1</d" algo_cfs1and2.cfg');
% system('sed -i -e "/>OUTPUTBUSFLATMDS2</r output2flatmds1.cfg" -e "/>OUTPUTBUSFLATMDS2</d" algo_cfs1and2.cfg');
system('sed -i -e "/>OUTPUTBUSFLAT1</r output1flatddb1.cfg" -e "/>OUTPUTBUSFLAT1</d" algo_cfs1and2.cfg');
system('sed -i -e "/>OUTPUTBUSFLAT2</r output2flatddb2.cfg" -e "/>OUTPUTBUSFLAT2</d" algo_cfs1and2.cfg');
system('sed -i -e "/>OUTPUTBUSFLATMDS1</r output1flatmds1.cfg" -e "/>OUTPUTBUSFLATMDS1</d" algo_cfs1and2.cfg');
system('sed -i -e "/>OUTPUTBUSFLATMDS2</r output2flatmds1.cfg" -e "/>OUTPUTBUSFLATMDS2</d" algo_cfs1and2.cfg');
system('sed -i -e "/>TYPEDEF</r types.cfg" -e "/>TYPEDEF</d" algo_cfs1and2.cfg');
......
......@@ -20,7 +20,7 @@
>MDSWAVEGEN2<
+MDSWriter_0 = {
+MDSWriter_1 = {
Class = MDSWriter
NumberOfBuffers = 2000 //Compulsory. Number of buffers in the circular buffer defined above. Each buffer is capable of holding a copy of all the DataSourceI signals.
CPUMask = 0x8 //Compulsory. Affinity assigned to the threads responsible for asynchronously flush data into the MDSplus database.
......@@ -50,7 +50,7 @@
GAMSimulink1_ExecTime = { NodeName = "cfs1.system.CH03" Period = MDSW0PERIOD AutomaticSegmentation = 0 MakeSegmentAfterNWrites = 2000 SamplePhase = 0 }
GAMSimulink1_WriteTime = { NodeName = "cfs1.system.CH04" Period = MDSW0PERIOD AutomaticSegmentation = 0 MakeSegmentAfterNWrites = 2000 SamplePhase = 0 }
//>OUTPUTBUSMDSWRITER<
//>OUTPUTBUSMDSWRITER1<
}
/*
+Messages = { //Optional. If set a message will be fired every time one of the events below occur
......@@ -76,6 +76,34 @@
}
*/
}
+MDSWriter_2 = {
Class = MDSWriter
NumberOfBuffers = 2000 //Compulsory. Number of buffers in the circular buffer defined above. Each buffer is capable of holding a copy of all the DataSourceI signals.
CPUMask = 0x8 //Compulsory. Affinity assigned to the threads responsible for asynchronously flush data into the MDSplus database.
StackSize = 10000000 //Compulsory. Stack size of the thread above.
TreeName = "scdds" //Compulsory. Name of the MDSplus tree.
PulseNumber = 0 //Optional. If -1 a new pulse will be created and the MDSplus pulse number incremented.
StoreOnTrigger = 1 //Compulsory. If 0 all the data in the circular buffer is continuously stored. If 1 data is stored when the Trigger signal is 1 (see below).
EventName = "updatejScope" //Compulsory. Event sent to jScope when TimeRefresh seconds have elapsed.
TimeRefresh = 5 //Compulsory. An event with the name set in the property EventName is sent to jScope when TimeRefresh seconds have elapsed.
NumberOfPreTriggers = 0 //Compulsory iff StoreOnTrigger = 1. Number of cycles to store before the trigger.
NumberOfPostTriggers = 0 //Compulsory iff StoreOnTrigger = 1. Number of cycles to store after the trigger.
Signals = {
Trigger = { //Compulsory when StoreOnTrigger = 1. Must be set in index 0 of the Signals node. When the value of this signal is 1 data will be stored.
Type = uint8 //Type must be uint8
}
Time = { //Compulsory when StoreOnTrigger = 1. Can be store in any index, but TimeSignal must be set = 1
Type = uint32 //Type must be uint32 or int32
TimeSignal = 1 //When set, this signal will be considered as the time source against which all signals will be stored.
TimeSignalMultiplier = 1e-6 //Default = 1e-6. Multiplier to convert the time signal units into seconds,
}
//>OUTPUTBUSMDSWRITER2<
}
}
}
+States = {
Class = ReferenceContainer
......@@ -98,6 +126,7 @@
GAMSimulink1
GAMSimulink2
StorageBroker1
StorageBroker2
//LoggerBroker
}
}
......
......@@ -7,18 +7,38 @@
GAMSimulink1_ReadTime = { DataSource = Timings Type = uint32 }
GAMSimulink1_ExecTime = { DataSource = Timings Type = uint32 }
GAMSimulink1_WriteTime = { DataSource = Timings Type = uint32 }
//>OUTPUTBUSFLAT1<
//>OUTPUTBUSFLAT2<
>OUTPUTBUSFLAT1<
}
OutputSignals = {
Trigger = { DataSource = MDSWriter_0 Type = uint8 }
Time = { DataSource = MDSWriter_0 Type = uint32 }
Thread1_Cycletime = { DataSource = MDSWriter_0 Type = uint32 }
GAMSimulink1_ReadTime = { DataSource = MDSWriter_0 Type = uint32 }
GAMSimulink1_ExecTime = { DataSource = MDSWriter_0 Type = uint32 }
GAMSimulink1_WriteTime = { DataSource = MDSWriter_0 Type = uint32 }
//>OUTPUTBUSFLATMDS1<
//>OUTPUTBUSFLATMDS2<
Trigger = { DataSource = MDSWriter_1 Type = uint8 }
Time = { DataSource = MDSWriter_1 Type = uint32 }
Thread1_Cycletime = { DataSource = MDSWriter_1 Type = uint32 }
GAMSimulink1_ReadTime = { DataSource = MDSWriter_1 Type = uint32 }
GAMSimulink1_ExecTime = { DataSource = MDSWriter_1 Type = uint32 }
GAMSimulink1_WriteTime = { DataSource = MDSWriter_1 Type = uint32 }
>OUTPUTBUSFLATMDS1<
}
}
}
+StorageBroker2 = {
Class = IOGAM
InputSignals = {
Trigger = { DataSource = DDB1 Type = uint8 }
Time = { DataSource = DDB1 Type = uint32 }
Thread1_CycleTime = { DataSource = Timings Type = uint32 Alias = State1.Thread1_CycleTime }
GAMSimulink2_ReadTime = { DataSource = Timings Type = uint32 }
GAMSimulink2_ExecTime = { DataSource = Timings Type = uint32 }
GAMSimulink2_WriteTime = { DataSource = Timings Type = uint32 }
>OUTPUTBUSFLAT2<
}
OutputSignals = {
Trigger = { DataSource = MDSWriter_2 Type = uint8 }
Time = { DataSource = MDSWriter_2 Type = uint32 }
Thread1_Cycletime = { DataSource = MDSWriter_2 Type = uint32 }
GAMSimulink2_ReadTime = { DataSource = MDSWriter_2 Type = uint32 }
GAMSimulink2_ExecTime = { DataSource = MDSWriter_2 Type = uint32 }
GAMSimulink2_WriteTime = { DataSource = MDSWriter_2 Type = uint32 }
>OUTPUTBUSFLATMDS2<
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment