trm

MrPLC Member
  • Content count

    29
  • Joined

  • Last visited

Community Reputation

1 Neutral

About trm

  • Rank
    Sparky

Profile Information

  • Country Bulgaria
  1. Accessing D512 - D999 in FX3U problem

    Hehe :) OK, no problem :D :P :) ps: you have PM.
  2. Accessing D512 - D999 in FX3U problem

    Yes that HELPED ! I knew there were system/reserved space of registers, but forgot where this is configured. Thank you a lot ... Tell me how can i send you a pack of beer hh and preferred brand :P :) :D
  3. Hi ! I have the following problem: I use a FX3U-16MR PLC with 2xFX3U-485ADP-MB + 1xFX3U-ENET GX Developer 7.01 and when i try to access data registers from 512 to 999 i get error AT COMPILATION: Error: F1028 Access to system addresses is denied Error: F0137 Illegal device used or symbol not valid I can configure them to be latch (by default) or non-latch. I can see them as available 0-7999 (actually 0-199 non-latch + 500-7679 latch) 0 - 199 non-latch (can be conf. to be latch) 500 - 1023 latch (can be conf. to be non-latch) 1024 - 7679 latch (latch only) I contact my local dealer and support , but they can't help me till Monday and also they use mostly GX Developer ;( And with GX Developer it works. Thank you in advance for your time and help.
  4. (newbie) isntruction question

    I know this, but FEND i have to add !?. So why it is telling me there is two FEND instruction.... Instantly it comes to my mind that the IDE adds and the FEND instruction automatically ;) :) ps: but what about the operational error i get :???
  5. (newbie) isntruction question

    Thank you a lot , my program now works as expected and looks the way i wanted :) :) Thank you all again ! Although the program works perfectly and gives correct results i have PLC error (when i check PLC Diagnostics) --- I have a suggestion that it is because of missing END but when i try to add END GX IEC Developer tell me "he" puts them , not I. And when I add FEND it tells me i can't add more than one and i have only one ;( Very odd , but most likely it is also something i have read but missed Have a nice day and "Happy coding" :-]]
  6. (newbie) isntruction question

    Yes ! If it doesn't i get error something like "label doesn't exists" or it was "no such label" ;) :) I rewrite my code to use FOR and i workaround this issue , but it's really strange. One more thing is that i need(ed) to use CALL in a FOR and as far as i know/understood from the documentation it is permissible( i mean allowed ;) ). But when i have this code: FOR TIMES CALL FUNCTION NEXT It compiles ok, but then when i run it on the PLC i get ERROR_LED ** btw: i now use a lot wand, wor, wxor function, so thank you for telling me for them , i somehow was missing them :) OFFTOPIC ** ii "hate" when this led goes on , it means ... "well we know you are frustrated cause our IDE and compiler didn't warn you, but hey it was not going to be so fun without such possible scenario: to have a 0 errors , 0 warning program , but crashing in the PLC :D , also we are happy you paid us so much so we can screw with you End of OFFTOPIC
  7. (newbie) isntruction question

    I have one strange problem , i have the following lines of code: LD M8022 CJ somewhere This code makes the PLC in state "dead". The error led on the PLC doesn't blink it is always on and there is no communication withthe PLC ideas ? Only way to make it work again is to turn power off and then turn it on. ps: if the code is LD M0 OUT M1 RST M0 CJ somewhere it works without errors I really want to say 'what the f***' ... :|
  8. RS2 requeset then RS2 response

    But yet it's only a implementation of the modbus protocol , it doesn't handle the actual sending and receiving ;) where is my problem when i'm acting like slave (RTU Modbus). And i already have writen my own modbus implementation for Master (cause i use only few of the available Function Codes ;) ) But Thanks ! That's really a useful information ;) :)
  9. RS2 requeset then RS2 response

    I needed this request -> response as an optional feature ... , but ... as of now i have two working codes with such kind of 'behavior' (and not working very well). 1. receiving request and sending correct response many times before stopping :| [ i will not put the code , cause it's not worth ed ] 2. receiving 5-7 bytes and then sending one ... LD M8002 MOV K1 D10 MOV K65 D11 LD M8000 RS2 D11 D10 D21 K10 K1 LD M8403 SET M0 RST M8403 LDP M0 SET M8402 RST M0 -- The device i'm working on actualy it's going to be Serial RTU Modbus Master and Ethernet TCP Modbus Slave , but i wanted and my bosses wanted to be able to respond and to RTU Modbus requests on the rserial port(s) ... but it will have to be developed on a later stage ... Thank you for all your help and time spent ! I leave the subject open and when i have the time i will write here. Yet again i'm sure we are missing something small , not mentioned in the documentation , which i read not just serveral but many times - especially the part about RS2 communicaiton ! :( I think this is a stupid problem ... and some skilled PLC programmer will actually laugh at us , but i'm not worried about that, i'm worried about the time I/we spent for such easy task (or at least easy at first sight). Good Luck and have a nice weekend (it's 16 o'clock by me so i have 3 more hours of word day ;) :)) Bye.
  10. RS2 requeset then RS2 response

    I have test your code Dariusch, it does not send .. it receives the request ,but does not send ;) i have no time to debug it right now , but maybe next week I will develop this code: LD M8002 _initialization_ LD M8000 RS2 D11 K1 D21 K1 K1 LD M0 // flag send SET M8402 RST M0 // right after send request is set clear flag (the send request already have gone on it's way) LD M8403 // if we have received SET M1 // set receive flag _collect_data_ // move to _more_user_buffer (cause the buffer we have in the RS2 line we have dedicated to the communication which happens every scan ! :) RST M8403 // clear receive flag --- I will write to you as soon as it works right and give you the code ...
  11. RS2 requeset then RS2 response

    Hi ! Thanks ! Something very important i have realized yesterday ((but have forgotten today) when going back to home and thinking it through. And now it came back to me: Not the 'Send Request' must be constantly true , the RS2 instruction must be ! I.e you can have only one line RS2 and depending on M8402 it will send and receive or only receive ! LD M8002 MOV K65 D11 LD M8000 RS2 D11 K1 D21 K1 K1 LD M0 SET M8402 RST M0 LD M8403 RST M8403 Test it ... through Debug/Online Monitor change the value of M0 to 1 and it will SET M8402 then right away M0 goes 0 It receive every time and sends only when M0 is set :) :) I haven't implement it in my program exactly in this way, but from one hour and so i use only one (1) RS2 instruction and once i have succeeded to send per request ... playing with the M8402 only , how and when to be set .. nothing else and now i remember this , so after the launch break (cause here by me it's 12:51) i think i will finish it. After that i will test your program ! Thanks for you reply !!! btw: The treasure key is in the Pulse instructions and SET (not OUT instruction) ! :) :) !
  12. RS2 requeset then RS2 response

    Here is another code that does one request receive and then response send Now the question is what to add so it does it only one send per request. There are few options i can think of: 1. check M8403 , if 1 then we have receive complete = i.e bytes received so we process the request and send the response 2. check D8403 , if >0 then we have receive x number of bytes 3. check first buffer reg, i.e if RS2 D0 K0 D21 D20 K1 then D21 is the first buffer register and we check if it has changed or it has a value different than 0 , if yes then we have (new) request :) ---- I have tried all of this variant .. including using/making a flag (M0/M1/M2/M3/... etc) for the different states, but with no success so far ... And i know this is a very stupid and funny problem ! ;) :) LD M8002 //on first scan OUT Y0 //test output on MOV H1C81 D370 // CH1 config MOV D370 D8400 // init CH1 MOV K8 D20 // bytes count to be received MOV K3 D10 // bytes count that for sure will be send MOV H0102 D14 // just dummy bytes of data MOV H0304 D15 // same MOV H0506 D16 // same MOV H0708 D17 // same LD M8000 //non-stop working/receiving as there can be multiple requests from different clients RS2 D0 K0 D21 D20 K1 // send nothing , receive 8 bytes in D21-24 regs (cause 8bytes = 4 word) LD M8403 // if receive complete WAND H00FF D21 D31 // get lower byte WAND HFF00 D21 D32 // get high byte SWAP D32 // switch MSG, LSB so the reg represent the actual value (i.e 0x0900 is actualy 0x0009 -> decimal 9, because we receive in 8 bit mode but store in 16 bit registers D... ) MOV D23 D33 // copy value (this is due to the protocol i use RTU Modbus) SWAP D33 // FX3U-485ADP-MB sends in LITTLE ENDIAN for unknown reasons and i don't find a setting/bit to change that , so we have to switch MSB/LSB to send the high byte first ! :) LD= D31 H1 // if unit = 1 AND= D32 H3 // if function code = 3 OUT M0 // flag M0 is ON LD M0 // if flag for correct request is on MOV D31 D11 // full buffer (id) MOV D32 D12 // same (function code) MUL D33 H2 D13 // we have X words requested * 2 bytes each = x*2 (length of data frame) MOV D10 D30 // move constant byte count for send (id + fc + length = 3) ADD D13 D30 D30 // add the count of the date bytes = x * 2 (we already calculated this above) RS2 D11 D30 D0 K0 K1 // send from reg D11 , D30 count of registers , no receiving SET M8402 // send request to _SERIAL_MODULE_CH1 Thank you for your time ... bye for now ;) :) ps: GX simulator can not simulate serial communication / module ;( :(
  13. RS2 requeset then RS2 response

    Here it is ... I wrote the program in IL in GX IEC Developer 7.04 and then looking at it i wrote it in Ladder in GX Developer 8 So the attached file is a project for GX Developer and it is in Ladder ;) Thank you a lot for your time and answers ! :) request_response_v1.rar
  14. RS2 requeset then RS2 response

    GX IEC Developer 7.04 and FX3U plc. after few minutes i will upload the last code i wrote in ladder for GX Developer 8, which has to work , but again does not :( I have both GX IEC Developer , GX Developer ... and also GX Simulator 6 ...
  15. RS2 requeset then RS2 response

    I always write in IL , but sometimes use Ladder module ... If you want i can make the IL into Ladder and give it to you , but it has to happen later, cause now i'm on a deadline :|