Storing Analogue Pressure Reading

Syfactor

Member
Join Date
Jun 2011
Location
Newcastle
Posts
4
Hi!
A bit of background...I am new to PLCs, I have finished one program which is being used in production, but that only had one input, and two outputs so thought I would step it up a bit...
My next program has 4 inputs, and 10 or so outputs. I am using a drum sequencer for this.
I am using 2 analogue pressure transducers (4-20mA) and converting the signal to psi using scaling.
This is where I am stuck. At a specified step in the Drum I would like to take a sample reading of one of the pressures (Floating point) and store that pressure in memory, do some math on it and use it to compare against the other pressure input until the math condition is met, and then move on in the drum sequencer.
I can't figure out how to take a sample pressure, store it for a while and use it, then resample for the next time it will be used.

I am using a simple Click PLC which has limited instructions.
Any point in the right direction here would be greatly appreciated!
Cheers,
Simon.
 
HI Simon - Tell us what type of PLC is it

AB use the F8 area
Omron use DM area - might be LR
Siemens MD

Also do you need to store if power goes down?
 
Is the Drum sequencer Time based or Event based? If you have only one point in the sequence where you pause for this condition then, if the trum is time based, I would create two drums, one for all the timed steps before this sampling and comparison and one for thos timed steps after the comparison is complete. The 'drum complete' bit of the first drum would enable the sample and comparison. When the comparison is correct then enable the second drum.

Create a one shot of the firsst drum being complete. Use that to sample analog 1. Then continously sample the second analog and compare to the stored value of the first. The sucessful completion of the comparison is the trigger to start the second drum.
 
Simon,

Looking at the Click PLC (from Automation Direct), it appears to have several different types of memory locations available for storing values, such as DS, DD, DH, and DF. You can use the SET command to store data to these memory areas. See the Click Software Manual.
 
sorry simon Next time I will rread the PLC type - too early in the morning
haven't worked with Koyo yet
 
Hi everyone,
Thanks so much for the replys!
Ian,
The plc has a battery for memory, but no I don't need to store the values for pressure, except for one roll of the drum sequencer.

Bernie:
My drum is event based, in order that I can use timers when I want, and also use inputs to meet conditions to make the drum step complete at other times.
I will look at splitting the drum into two, bacause yes the first six steps of twelve are just time based.

Next I will investigate "One Shot" I have seen that and thought that it may be what I am after, question: Is a one shot a one time only, until the PLC is powered down, or can you redo the "One shot"?
If I can redo it then maybe I can use this.

Lancie1:
I did try to use the SET command, but now that I have read your reply I think what I was doing wrong was trying to set to the same address type as the analogue in signal, which did not work, I will investigate the correct memory type and try that.
Cheers guys!
I am about to go and become a paid member here.
Simon.
 
This is where I am stuck. At a specified step in the Drum I would like to take a sample reading of one of the pressures (Floating point) and store that pressure in memory, do some math on it and use it to compare against the other pressure input until the math condition is met, and then move on in the drum sequencer.
I can't figure out how to take a sample pressure, store it for a while and use it, then resample for the next time it will be used.

Simon,

See if this makes any sense to you.

PS. I'm sure the drum and the math parts are wrong. But this should give you an idea of how to store a value and then compare.
 
Cheers Vaughn!
That sample code there looks a little like what Bernie suggested, but seeing it makes a whole lot of sense.
I will be re-writing my code to look like this.
There are a few methods in there that I was not aware of, like rising edge contact (seems like that will only be true for a short while, so will effectively sample the pressure) and resetting multiple contacts (ranges).
Bear with me while I slowly get my code re-written in a better way, and test it, I will keep you posted ASAP.
Thanks again,
Simon.
 
once you get it going Simon post it
I would be interested in looking bothe at Koyo and at your program.
 
Hi guys, I really appreciate the help and comments here, I have a nice working program now, cheers! The edge contact was the key here for me.

I wound up staying with one event drum, I tried splitting the drums up and using conditions to start the next one, but found I could do the same thing within the event drum.
7

One more question: in time based drums is it possible to externally set the time for each step?
This would be very nice compared to having to use an event drum and external timers to alter the time for steps...

Ian:
I tried to post a picture of the program steps that I went with, but I can't seem to upload pics. The code is very similar to the click example that Vaughn posted. My comments on the Koyo stuff:
I like the Click PLC, but do not have anything to compare it to! I went with it because with limited instructions, and it had all of the I/o I needed (Analogue model)I thought I couldn't get too lost in the old wood for the trees scenario.
So far the click has done everything faultlessly, and I was very impressed with how easily it works with Automation directs C-more micro Touch screens.
Big thanks again,
Regards,
Simon.

Click solution.jpg
 

Similar Topics

HI all, I have a backup from a Series 7000 Cognex camera. I am trying to restore and see the vision tools used in the job. Can I restore those...
Replies
0
Views
61
Hello, I have an int variable that updates the value every second. I want to store the 100 values in an array. Array should keep storing the...
Replies
7
Views
999
Hi I have a vision camera that I’m getting the string data P908765 from the vision on an advance trigger .which im using a S -move. Then I put...
Replies
1
Views
369
Hello You guys helped me with a similar issue some time back on storing totalized values to different tags each month. I have a similar issue...
Replies
19
Views
1,462
Is there any easy way to store a password for an email address that is changeable on the HMI that is not easily deciphered. aka, don't write it to...
Replies
0
Views
378
Back
Top Bottom