Posted 11 Jun 2018 Hi ! I have to Control and Read an Masss Flow Controller (MFC) MKS MF-1, I have give this one an IP Adress (10.46.103.75). How can I Control it over Modbus TCP? I found in GX Works 3 in Tool/Predifined Protocol Support function the Modbus Menue, but i have no Idea how to Config it, i have no Idea how Modbus works..... Have someone an Example for a Configuration? Share this post Link to post Share on other sites
Posted 19 Jun 2018 (edited) I Found this solution: ModbusTcpClient(ConnectionNo:= 3 ,LocalPortNo:= 5645 ,RemoteIPAddress:= 16#0A2E6749 ,RemotePortNo:= 502 ,UnitId:= 255 , EnableConnection:= EnableConnection ,StartSend:= StartSend ,FirstAddress1:= FirstAddress ,ResponseTimeout:= 100 ,NoOfRetries:= 1 , SingleDevicesFCode05h06h:= SingleDevices ,ReadOnlyDevicesFCode02h04h:= ReadOnlyDevices ,Read:= Read ,Write:= Write ,BitOrRegister:= BitOrRegister , ReadStartAddress:= ReadStartAddr ,ReadNoOfDevices:= ReadNoOfDevs ,WriteStartAddress:= WriteStartAddr ,WriteNoOfDevices:= WriteNoOfDevs ,WriteData:= WriteData , OpenComplete=> OpenComplete ,CommandCompleted=> CommandCompleted ,ReadData=> ReadData ,ReadDataByteCount=> ReadDataByteCount ,ReadDataWordCount=> ReadDataWordCount , OpenError=> OpenError ,OpenErrorCode=> OpenErrorCode ,Error=> GeneralError ,ResponseTimeoutError=> ResponseTimeoutError ,InvalidCommand=> InvalidCommand , InvalidResponse=> InvalidResponse ,ModbusException=> ModbusException ,ModbusExceptionCode=> ModbusExceptionCode ); Now i can Read and Write something to the MFC Controller, in Example if i send: WriteData[0].0:=TRUE; Opens the Valve and a FALSE close this. Now my Problem is, I need to set the Flowpoint. How I Can Use 0x0001 Bit 1..16 like below (WriteData[0].0:=TRUE; OR WriteData[0]:=1234) Or Read in Example the ThermalMassFlowRate 0x0001 bit 1..16 (ReadData[1]:=XXXXXX) ? Edited 19 Jun 2018 by Levent1970 Share this post Link to post Share on other sites