1
0
This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.

23 lines
823 B
Java

import ch.hevs.isi.core.BooleanDataPoint;
import ch.hevs.isi.core.FloatDataPoint;
import ch.hevs.isi.field.BooleanRegister;
import ch.hevs.isi.field.FieldConnector;
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");
//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);
//write to values
remoteFactorySp.setValue(0.74f);
solarPanel.setValue(true);
}
}