1
0

changed the field component, made some test and added some comments

This commit is contained in:
Nils Ritler
2023-06-06 17:50:17 +02:00
parent 55fa80c4d4
commit c478c0a7bf
8 changed files with 111 additions and 57 deletions

View File

@@ -7,28 +7,16 @@ import ch.hevs.isi.field.FloatRegister;
public class Field {
public static void main(String[] args) {
//create an FieldConnector
//reads the datapoint values and displays them in the consol
FieldConnector.getMySelf().initialize("LocalHost", 1502,"src/main/resources/ModbusMap.csv");
//FloatRegister fRI = new FloatRegister("GRID_U_FLOAT",false,89);
BooleanRegister bRI = new BooleanRegister("SOLAR_CONNECT_ST", false ,609);
FieldConnector.getMySelf().startPeriodicalPolling();
//create two datapoint to write a new value to them
BooleanDataPoint solarPanel = new BooleanDataPoint("REMOTE_SOLAR_SW", true);
FloatDataPoint remoteFactorySp = new FloatDataPoint("REMOTE_FACTORY_SP", true);
//FloatRegister fRO = new FloatRegister("REMOTE_FACTORY_SP",true,205);
BooleanRegister bRO = new BooleanRegister("REMOTE_SOLAR_SW", true ,401);
/*
fRO.fdp.setValue(0.8F);
bRO.bdp.setValue(true);
*/
while(true)
{
/*
float value = fRI.dataPoint.getValue()*1000;
System.out.println(value);
*/
/*
System.out.println(bRI.bdp.getValue());
*/
}
//write to values
remoteFactorySp.setValue(0.74f);
solarPanel.setValue(true);
}
}