Author Topic: FP403MR with FX2424  (Read 8551 times)

Lorne Van Dusen

  • Jr. Member
  • Posts: 93
  • I'm a old guy
    • View Profile
FP403MR with FX2424
« on: January 12, 2017, 10:02:55 AM »
I am still confused about the correct addressing inside the MD4030 MR when it comes to internal relays and input and output on the FX2424
Whit some trial and error I found that RC00059.00 actually turns on Relay 473, RC00059.01 turns on Relay 474 and so on.
Is there a simple formula that I can use to figure out a faster way to get the address correct?
Example what would be the correct IC number in the FP403MR to turn on Input 17 on the PLC?
What formula to use to figure out what RC number to trigger say Relay 146 inside the PLC?

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:FP403MR with FX2424
« Reply #1 on: January 12, 2017, 12:23:54 PM »
Lorne,

If you hunt very hard you can find some information on the address mapping.  Ignore any reference to Omron I/O mapping or any reference back to the User manuals to the Fx2424 PLC.  There is no info on the Omron I/O mapping in any of the current PLC user manuals.  You would have to go back to the T100MD+ user manuals to find any info and that info would be of no value.

This is the only info that I could find for the address mapping used by the FP403MR is here:
  • First find a download file named, "FP4030MR_Demos_and_Guides.zip".  
  • Find the document named, FP4030MR Mapping.pdf" that is in the zip archive.
  • Go to section "5. Reference Data and Additional Information".

There is only 2 useful bits of information about address mapping in the entire document:
  • The first 5 rows in the table are highlighted in bright yellow.
  • The last paragraph at the end of section 5:

Data No 1 to 5, which is highlighted yellow in the above table, is mapped slightly
different in that every two registers in the FlexiPanel HMI make up one register in
the PLC. For example, Input Register 0 and 1 in the FlexiPanel HMI would combine
o make the INPUT[1] register in the TRi PLC. This means that Input Register 0 would
account for bits 0 to 7 of INPUT[1] (physical inputs 1-8) and Input Register 1 would
account for bits 8 to 15 of INPUT[1] (physical inputs 9-16). Then Input Registers 2 and
3 would combine to make up the INPUT[2] register and so on. The data is mapped
this way because the HMI is only able to access 8 bits from the PLC for these
registers.
[/list]
What all of this means is that if you are trying to build an address tag for RELAY #474 is that you will need to follow an algorithm that looks like this:

' Calculate FP403MR address tags for a TRI RELAY
'
T = 474            ' TRI PLC RELAY #474
R = T - 1           ' Subtract 1 from the TRI address to get a "zero-based" address
B = R MOD 8   ' Calculate the bit position within an 8-bit byte
R = R / 8      ' Calculate the register number for the tag

' At this point R is the register number, 59 and B is the bit position of 1
[/font][/color]

Now you can build the tag value of RC00059.1

I do not know how the address tags are formed for anything but the first 5 rows of the table. The algorithm should work for PLC INPUTs, OUTPUTs, TIMERs, COUNTERs and RELAYs.  

You might consider configuring the FlexiPanel to communicate with the TRI PLC using the industry standard Modbus RTU protocol rather than the TRI unique communication protocols.

Modbus is handled by the TRI PLCs quite nicely and is an industry standard protocol. Modbus register mapping is documented in the TRI manuals.

Best regards,

Gary D*ckinson
« Last Edit: January 12, 2017, 01:19:49 PM by garysdickinson »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:FP403MR with FX2424
« Reply #2 on: January 13, 2017, 10:18:50 AM »
Thank you Gary. That is a useful algorithm and it would apply highlighted region of the mapping table (inputs, outputs, relays, timer bits, and counter bits) as you mentioned.

The advantage of using the TRI protocol with the FP4030MR HMI is the ability to access strings and 32-bit variables directly, whereas Modbus only allows direct manipulation of 16-bit numerical registers.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Lorne Van Dusen

  • Jr. Member
  • Posts: 93
  • I'm a old guy
    • View Profile
Re:FP403MR with FX2424
« Reply #3 on: January 27, 2017, 07:21:54 AM »
Gary I was very impressed with your replay.
What I was doing was dividing the PLC address by 8 then I would at least get the main addressing of the relay inside the FP4030MR but I was always off by 1.
After I read your response it finally hit me that the text display starts at 0 and the PLC starts at 1.
I was very surprised that the TRIPLC starts at address 1.1
When I first started learning the ins and outs of the TriPLC I struggled with the fact that all their addressing starts at 1 and not 0 like most other manufactures DM0, Input 0.0, Output 0.0
 

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:FP403MR with FX2424
« Reply #4 on: January 27, 2017, 11:07:26 AM »
Lorne,

Welcome to the wild world on PLCs!  

Zero is a pretty new idea.  It dates back to about 773 AD. Until then if you had nothing to sell you didn't need to count it.  If you had stuff to sell you could inventory it by counting 1,2,3...

Old computer languages like BASIC and FORTRAN considered 1 as the index of the first item in an array.  Most modern computer languages think that 0 is the index of the first item (or you can specify the starting index). Starting with 0 simplifies the math for the computer but would confuse people born before 773 AD.

TRI's PLCs tend to use 1 or +1 for lots of stuff.  There isn't a right or wrong to this, it just is what it is.  At least they are consistent.

I consider the MP4030 to be the "odd man" in this combo.  Their use of 8-bit byes versus 16-bit words for data transfer is very uncommon in PLC/industrial control circles.  It's been a long time since I have run into this sort of behavior.

It would have been nice if TRI had written more useful documentation for the MP4030 and the use of TRI native host communication protocol, but they didn't.

Good luck,

Gary D*ckinson


« Last Edit: January 27, 2017, 11:14:24 AM by garysdickinson »

Lorne Van Dusen

  • Jr. Member
  • Posts: 93
  • I'm a old guy
    • View Profile
Re:FP403MR with FX2424
« Reply #5 on: January 27, 2017, 11:38:36 AM »
Gary are you really an old guy like me? In the old days I would have been forced to retire 2 years ago.

As for the numbering systems I totally agree. It really doesn't matter if we start from 0 or 1 as long as we are consistent. The frustrating part is when you are connecting 2 different devices and they both have different terminology. Bits in one are 0 to 7 and bits in the other are 1-8 it just makes it easier to make mistakes that you have to spend time figuring out.

As for the 8 bit addressing in the 4030 I also was quite surprised, I was using text displays more than 10 years ago that were 16 bit. My first thought when I started to use it was that TriPLC made a deal to take over and modify an old design text display to sell with their products.

Overall though the FP4030 is a nice looking display with lots of usable features and even in low quantity pricing it is in a good price range for what it is capable of doing.

My number one complaint is that you need to supply it with a separate cable to plug into the comm port and a different cable for the required power supply. I was used to a OMRON display that did not require a separate power connection

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:FP403MR with FX2424
« Reply #6 on: January 27, 2017, 05:44:46 PM »
Lorne,

I am a certified old guy.  I retired 17 years ago.

The fP4030mr is a real product made by an Indian company named Renu Electronics.  Other than getting a custom driver software written for the FP4030 to work with the PLC's native protocol, I don't suspect that TRI has done anything to the HMI.

I have not used the fp4030.  Other than the problems with getting it working, how do you like it?  The price excellent.  

My first TRI product used a 4x20 LCD and a bunch of switches that TRI sells.  All of the code was written on the PLC side and the effort to write the user interface in ladder logic and custom functions was about 10x more than the actual code that ran the clients system.  I still use the 4x20 LCDs with the PLCs mostly for debug and status, but not as an end user interface.

I have used the 4.3 and 7" Weintek HMI's with the PLCs and have found that the combination is amazingly powerful.  If you get the models that support Ethernet, you can remotely run the HMI from anywhere in the world. They, also, support data logging to a USB stick.

The Wientek programming seems real simple, just drag stuff onto a screen and poof you have a user interface!  As soon as you need something else, the Wientek gets real complicated and it has been a long learning curve.

Best regards,

Gary D*ckinson

« Last Edit: January 27, 2017, 05:46:13 PM by garysdickinson »

Lorne Van Dusen

  • Jr. Member
  • Posts: 93
  • I'm a old guy
    • View Profile
Re:FP403MR with FX2424
« Reply #7 on: January 31, 2017, 02:00:02 PM »
Once you figure out the difference between the FP4030MR and the TRI-PLC everything works smoothly.
One small quirk you may or may not run into is that if you use lots of screens like I do you will need to separate the screens that the PLC calls and the screens that the Text display calls.
Not everyone uses text display the way I do so I will try to explain it in simple terms.
Because we do not permanently attach the text displays to the finished product but use it as a tool for our dealers to be able to adjust parameters that we allow the to adjust as well as use it for trouble shooting purposes. I therefore cannot use the standard Alarms so when ever the test display is plugged in and an alarm occurs the plc switches the screen to our alarm message page. To do this you need to move the value of the screen into the screen trigger register of the text display. Also I have it set up so that when you press two buttons at the same time the screen will switch to our start of the setting screens. To do this I set a bit in the PLC when ever the buttons are pressed to block out the PLC from changing the value in the screen trigger register and now the individual screens change the screen trigger register.
Then at any time someone presses the ESC key I reset the bit that was original set and the screen switches back to the main screen then resets the ESC bit.
Other than the original addressing quirks I mentioned I found the FP4030MR very easy to work with and it has a lot of good features.
If you have any other questions regard the FP4030MR let me know and hopefully I can answer them. After all old guys have to help each other out :D