Jump to content

Recommended Posts

Hello,

I have an issue reading the values of HSC by Ignition SCADA. PLC type: SM35-J-R20.

Shortly, there is a simple logic calculating the total output from the  machine, PNP proximity sensor is used to measure the number of the passing products, and it is connected to HSC input of the PLC.  SCADA monitors the current and the previous value of the counter, and in case the counter has been reset when the batch is being changed (the previous value is bigger than the current value), the previous value is memorized and it is added to the current counter value, at the same time  a tag value is incremented by 1 (this tag is like a flag, a  proof that the counter has been reset) . Now, the problem: without reset of the counter,  the flag shows increments, and the output is not calculated properly. The most important: 50% of the machines are equipped with SM35-J-R20, and the rest - with Omron CJ1M; the problem never has been faced on Omron machines. The communication protocol used for both type PLC is Modbus TCP.  Any ideas what might be the root cause? 

Link to post
Share on other sites

There is a full complement of RTC system integers available to help you with this basic programming issue. Those, along with the SB 2 system bit should give you what you need. Give it a try and report back if you're having difficulty.

Link to post
Share on other sites
21 hours ago, vasovas said:

but if the machine is OFF, and it is started at 5 am?

Probably not likely, but wondering if you also need to allow for what is in the topic below.  Also wondering if along with the topic's subject, you actually need  to be using the HSC.

cheers, Aus

http://forum.unitronics.com/topic/6118-hsc-resets-dw-counter-to-after-power-cut/

 

 

Link to post
Share on other sites

Hello, Ausman, thank you for your input, In fact, I have never faced such an issue with HSC values. My HSC values never have been lost on the next day.

My task actually is to reset the HSC accumulated on previous day value once only - at the start of the machine next day. As Flex727  has advised, RTC SI and SB2 can be used for this purpose, and  I use SI 37 , its value is incremented with 1 and stored to MI, so at the next power up, if it happens on the next day, that accumulated HSC value is reset. It works. Of course, now I have to implement mechanism to correct the MI value depending on what current month is. It needs some work, but as Flex727, nothing difficult. If you have brighter ideas how to do that, please advise. Thanks a lot!

P.S. To reset only once (first startup in the morning), I will use increment flag, so in case the machine has been restarted during the day (which happens couple of times actually), I will check that flag  value, if it is different from 0,  HSC will not be reset.

Link to post
Share on other sites

Hello
vasovas, you can compare SI 37 with some MI on every start wih SB2

If it differs - store your HSC value, reset it and rewrite MI with SI 37

If it same - do nothing

Must work fine if you don't get downtime month, but as you mentioned, you might also include SI 38 in condition

  • Like 1
Link to post
Share on other sites

Vasovas, to me you are focussing on the wrong SI.  From what you are saying this machine is working in a full working week, or 7/7 environment.

Use SB2 to store SI34 to an MI sequence that compares if the numbers match.

If the numbers match don't do anything, but if they are different then it is a new day.

This is covered by Flex saying there's a host of SIs to play with.

Also, my question as to whether you actually need to be using HSC?

cheers, Aus

Link to post
Share on other sites

Hello, Ausman, the production is not always 7/7, it might be 5/7, 6/7 or 7/7, it depends. HSC definitely is not necessary, because the counting frequency vary from 15 to 30 Hz. I am not the author of the original program, so I tried to add only what was necessary for SCADA project. 

Regarding the set of SI, I used SI 37 and the program works for the time being, I keep on monitoring it in case there is some bug.

Link to post
Share on other sites

If only even 1/7, SI34 still works. By "working week", I meant 5/7.  But if you've got it going, no worries. 

I only mention the HSC usage because sometimes quirky problems are introduced unnecessarily into user's projects.

cheers, Aus

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...