Omron Fins and CIO

I am using "node-red-contrib-omron-fins" and I am trying to read the CIO of an Omron CJ series PLC. I can successfully read W,H,A and D areas but when I try C I always get back the present value of the Timer area. What I am trying to achieve is to read the raw value of an analog input that resides at CIO2007. Anybody have any thoughts on this?

I should (I wrote the node)

As I remember from the fins manual, no specifier is required for core IO (just use the channel number)

Did you try that?

Thanks for the response. I did try that but I get an invalid address error.

Odd. Let me check and get back to you.

Edit...
So it seems I do expect CIO (as in CIO2007)

I cannot test or debug this as I dont have access to a PLC until tomorrow.

NOTE: If you need to proceed without waiting for me to get back to you, you can work around this by a simple line of ladder...
CF113 Normally On --> MOV 2007 D20007
then reading from D20007 (or whatever address you have spare)

NOTE2: I see you are accessing quite a few different areas - is generally recommended to read consecutive memory areas for 3 good reasons...

  1. Data Consistency (all data is read in one POLL meaning any related values are in phase with each other (read in the same PLC scan) )
  2. Speed (less polls == more speed)
  3. Cross reference (reading and writing to addresses not entered in PLC logic cannot be cross referenced and difficult to debug, less portable and can be a cause for concern especially when writing to the PLC)

I tried the CIO prefix and it gives the same result as C which returns the PV of the Timers.

Yeah, I have confirmed a bug will fix soon :crossed_fingers: .

In the meantime, did you see the work around...

Also, out of curiosity, did the (un-requested) advice in NOTE2 make any sense to you? I am wondering where your head is at on the points I raised?

Yes thank you for the advice and in most cases i will collect the data that i need into one continuous block of memory and do a single read. I am not actually reading all those different locations, I was just relaying my experience with testing your node. In this particular case I do not have access to the programming of the PLC as the machine manufacturer has a lock on it and will not allow me to get in so I am stuck with grabbing what I can from the I/O. I have another PLC on the same network so I may use it to collect data from the locked PLC with a message and grab it from there. Roundabout but will get the job done.
Thank you very much for the work that you put into this! I am just starting out with Node Red and finding all kinds of fun use cases for it.

I did suspect that might be the case (damn them oems :wink: )

Sometimes I get lucky and find the OEM has put most things in a contiguous area for HMI & supposing I only need 3 values that are 100 addresses apart - I request all 100 addresses - it is a LOT quicker to poll 100 addresses than 3 single polls! Sometimes we get lucky.

So, question, when I publish a Beta would you be willing to test it out & feedback?

The fix for CIO put my head back into the code and suddenly a number of short comings I had pushed to the back of my mind resurfaced - I'd like to get them resolved. One particular issue is that the node would simply discard an incoming msg if it was busy getting your last request - not ideal! I am implementing a sequence manager that will allow multiple in-flight requests to occur and (hopefully) instead of just ignoring your request, you get a big speed increase :slight_smile:

Would you be ok with being a tester? It will require a manual NPM install (I will provide instructions)

Let me know if you can (it would speed up getting Beta into Release).

Sure, I would love to help.

Hi, sorry for the delay.

So while it was a simple fix,

I have made some major improvements to the node & the underlying lib, I am now achieving speeds of over 130 msg per sec (not that I recommend that - polling at 200ms is more than adequate for most situations)

So the beta is no on NPM.

This is how you will install.

  1. stop node-red
  2. uninstall existing version npm uninstall node-red-contrib-omron-fins
  3. install beta npm install node-red-contrib-omron-fins@beta
  4. start node-red

This is a demo i did...

The output from debug...

2 Likes

@djpjd did you manage to successfully access all the data elements you need using this beta?

please let me know after you have done some testing and i will push the beta to live (once we have some confidence).

Cheers.

I was able to install the Beta and have been running it for a few days. everything works as expected so far. Thanks!

Good stuff.

Note, I pushed an updated beta about 48h ago. It fixes the output property (was being ignored).

@djpjd I have now released V0.3.0 & should soon appear in the node-red node library for installation.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.