Jimbo1349

MrPLC Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Jimbo1349

  • Rank
    Hi, I am New!

Profile Information

  • Country Australia
  1. This is really good advice - I cannot seem to figure out though why the returned data appears in %MW7 to %MW9. For example I am trying to do the following which is read register 2130 on an energy meter configured as a slave using modbus (plenty of comments in there should explain some of what should be going on?): (* SETTING DESIRED MEMORY WORDS TO SETUP MODBUS COMS*) (* MW0:030F = RECEIVE 16 BYTES WHICH IS 1 INTEGER*) (* %MW1:0000 = NO OFFSET OR DATA DELETE FOR RECIEVED DATA *) (* %MW2:0852 = REGISTER 2130 IN SLAVE HOPEFULLY*) (* %MW3:0010 = FIRST WORD ADDRESS IN SLAVE REFERENCED HOPEFULLY*) (* %MW4:000F = READ 16 BYTES HOPEFULLY WHICH ON 16 BIT PROCESSOR SHOULD = 1 SIGNED INTEGER*) [ %MW0 := 16#030F ] [ %MW1 := 16#0000 ] [ %MW2 := 16#0852 ] [ %MW3 := 16#0010 ] [ %MW4 := 16#000F ] (* ERROR CHECKING*) LD 1 AND %MSG1.D (* PERFORM MODBUS READ FUNCTION TO RETURN FRAME 10 WORDS LONG*) (* USE RETURNED VALUE WHICH SHOULD HAVE ADDRESS OF %MW7 (MW4 + 3 POSITIONS DOWN IN STACK AS PER MODBUS DATA DEFINITION *) (* [ EXCH1 %MW0:10 ]*) I cannot find the returned data though for some reason - is it not in %MW7 like I think it should be?