p.piwowar

Members
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

0 Neutral

About p.piwowar

  • Rank
    Member
  1. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    Thanks for great support. I doubt Diematic would be happy at all that people are hacking into their Modbus interface. Their package for PC connectivity costs some 2.500 Euro + VAT .....
  2. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    More... For a "busy" PC this does not work since Diematic expects three zeros to be send right (short period) after ReadHolding sequence. When the time period is too long between them, Diematic does not treat it as a valid sequence.
  3. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    Thanks! This is a nice trick. It works (with frequent errors) on a PC which is not so busy with other applications and DaqFactory with only few sequences running. In my real case (PC is really busy) this does not work so I have decided to write my own functions 03 and 16 with three-zeros handling built in.
  4. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    I must say it is not so easy for me. If I use function ReadHolding it never adds 3 zeros at the end. Without these 3 zeros Diematic never responds to any request. If I use low level Write instead with a proper Modbus command string with 3 zeros at the end, I can them read data with low level Read function and only them it works. I do not know how to make ReadHolding adding 3 zeros at the end ?
  5. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    Yes, it works now. Thanks! I have to come back to strange Three Zeros. Remember? Every Modbus sequence on Diematic RS485 has extra 3 zeros. If DaqFactory waits form the right moment to be master of the bus and sends a request (/010/003/000/001/000/123/CRC1/CRC2) it gets response ONLY, if there are 3 zeros at the end (/010/003/000/001/000/123/CRC1/CRC2/000/000/000). No 3 zeros - no response. No matter how many data it tries to read, when, etc. (*) Question: Is there any way to (1) modify Modbus protocol slightly or should I (2) create my own protocol with built-in waiting for bus-free and functions 03 & 16 which I need to operate with Diematic with ? Clearly (1) whould be much simpler. * I use PLANET ICS100 RS-232/422/485 over Fast Ethernet Media Converter to communicate between Diematic and DaqFactory. Not much to change in RS485 port parameters there, so I do not think this is a serial port related issue.
  6. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    Bigger problem now. After getting a new hint how to connect to Diematic, I have learnt I do not really need the slave functionality. Thanks for good lesson anyway.... This is a system with 2 masters, says the manufacturer. The Diematic master talkes to the bus and them makes 5 second silence for another master to pool data. What is the way to implement this machanism in DaqFactory? DaqFactory is checking if the bus is busy. After 0.5s of silence it has 4.5s to pool data as master.
  7. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    Of course it is working now! Your explanation of slave concept in DaqFactor is cristal clear. Thank you a great deal. Regards, Pawel
  8. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    Here you are. This is the simplest .ctl as a respnse to: Rx: /071/003/000/017/000/002/CRC1/CRC2/000/000/000 Looking forward for your opinion why DaqFactory never responds to this start.ctl
  9. p.piwowar

    (resistant) DIEMATIC boiler Modbus Slave

    I have done these 1, 2 & 3 very carefully: A. For 123 vales as device # 99 B. For 2 values as device #71 DaqFactory never responds... Interestingly, ... if I do it with a cheap software modbus slave simulator my PC (same hardware environment) responds Why DaqFactory does not? NB. I am still very far from achieving my goal to use DaqFactory to monitor and set boiler parameters since I can not see Diematic's reaction even to this software simulator..... Maybe someone on this Forum have done it....
  10. I have a gas boiler with DIEMATIC regulator with Modbus protecol. I have found somwhere a specification so I connected to a PC with DAQFactory. DIEMATIC is Modbus master device so it requires slave. DaqFactory monitor displays all traffic, so I could see /003/ requests to the device #99 (and others 20-24, 71-73) but DaqFactory never respondes to these. - no Tx: I have the right software version (Slave supported). Device number is set for 99 Channels/Modbus Slave# are set in range 1..123 per request Rx: /099/003/000/001/000/123/ ... The only strange thing I see in the Modbus data traffic is that every sequence is followed by 3 (three) zero bytes, like Rx: /099/003/000/001/000/123/CRC1/CRC2/ 000/000/000/
  11. p.piwowar

    Modbus - time management for beginners

    It is working now for more then 24 hours with no interruption! Please keep your fingers crossed .... Thanks a million!
  12. p.piwowar

    Modbus - time management for beginners

    Line #4 is: try Regards, Pawel
  13. p.piwowar

    Modbus - time management for beginners

    Yes - stacks means stops but the sequence appears as running in the Sequence window. Interestingly, when it "stacks" you can not see it "jumping" from line #4 to line #34. It's like stopped at line #4 all the times. (I repeat) it always helps to init the device manually by saving device configuration. No - I do not use USB. This runs over Ethernet connected through Ethernet/RS485 converter. In addition: 1.I never tried to stop the sequence and start it again after it stacks. I will try to do that next time. 2.Is that possible that the device generates 2 errors at one time and then .... the "try" and "catch" can not handle that ? Regards, Pawel
  14. p.piwowar

    Modbus - time management for beginners

    Thanks for your help a great deal (and I have bought the license). I have a more serious issue now. The sequence now reads the data every 2 seconds. It sometimes reports an error (mainly CRC or timeout) and then after 1-2 hours stacks. An easy way to restart it is to init the device through Device Configuration and click Save manually, as I had discovered before I, therefore adjusted my sequence to discover an event when error happens in three consecutive reads, wait 10 seconds and init the device (see the code). It is good but it stacks after 12-20 hours. I guess I have to know much more about error handling ? private data private errcount=0 while (1) try data = Device.n14.ReadHoldingFloat(1,47001,58) // reads into data 58 cells from meter and puts some of them to channels Vol_L1.AddValue(Private.data[0][0]) Amp_L1.AddValue(Private.data[0][1]) Wat_L1.AddValue(Private.data[0][2]) Vol_L2.AddValue(Private.data[0][7]) Amp_L2.AddValue(Private.data[0][8]) Wat_L2.AddValue(Private.data[0][9]) Vol_L3.AddValue(Private.data[0][14]) Amp_L3.AddValue(Private.data[0][15]) Wat_L3.AddValue(Private.data[0][16]) Wat_3.AddValue(Private.data[0][23]) FRQ.AddValue(Private.data[0][28]) KWh_3H.AddValue(Private.data[0][56]) KWh_3L.AddValue(Private.data[0][57]) errcount=0 // resets error_count after reaching here catch() ? strLastError+" "+errcount errcount=errcount+1 // increase error_count after catching an error if (errcount > 3) delay(10) Device.n14.InitComm() // Init the device n14 after 3 consecutive errors ? "Init" errcount=0 endif endcatch delay(2) endwhile
  15. p.piwowar

    Modbus - time management for beginners

    What if I use one of your examples presented in the manual and read (every 2 seconds, as the device really replies within this period surely) entire 54 float registers of the device and make Channels of the ones I really want? Can I save the number of used Channels ? ______________________________________________ private data while (1) data = Device.MyDevice.ReadHoldingFloat32(1,0,54) U1.AddValue(Private.data[0][0]) I1.AddValue(Private.data[0][1]) P1.AddValue(Private.data[0][2]) U2.AddValue(Private.data[0][8]) I2.AddValue(Private.data[0][9]) P2.AddValue(Private.data[0][10]) ...... FRQ.AddValue(Private.data[0][40])` ...... delay(2) endwhile ___________________________________________ Do I understand it right ? Regards, Pawel