Jump to content

A few questions about programming on a V350.


Recommended Posts

So after a bunch of trial and error I'm happy to say I've made some good progress on teaching myself how to program decently complex things, but a few things elude me so hopefully the questions I have aren't too obvious.

1. I have 2 sensors that I need to hook up to the PLC and I'm having trouble figuring out exactly what I need to do for it, I've looked up some posts on here about it but none of them seem to apply. It's a 4-20mA analog input that reads pH levels, but I'm not exactly sure what the linearization inputs (X1, Y1, X2, Y2, Y) should be.  If there's a guide or example program about that all I need is a point in the right direction.

This is the sensor we have - https://www.sensorex.com/docs/specs/SpecsS600Inline.pdf

2. Is there any way to make a timer that counts up? I came up with a convoluted way of doing that using a timer set at max time and subtracting it from that number, but I feel like there's a simpler way to do that I'm missing.

3. For sending an email through a PLC is an SD card required? The example program (Joe Tauser's) that I got from here has inputs for the email text and all of that and it seems to hold all the information I need to put on it so can I not use the SD card in that case?

Thanks for the assistance, if there's any other information I can send that would be helpful just let me know.

Link to comment
Share on other sites

  • MVP 2023

1.  The values that go in your linearization block depend on the type of analog input you are using.  Analog input modules such as the ATC8 use 14 bit analog (0-16384) and the onboard analog on the PLC itself is usually 10 bit (0-1023).  A linear block is a computerized line - for every X you get a Y.  You have to define the ends of the line.

For a 4/20 input, the line starts at 20% up the A/D output.  In the case of an ATC8, that's equal to 0.2 * 16384 or ~3277.  So your input values are 4 mA = 3277 to 20 mA = 16384.   X1 = 3277,  X2 = 16384.   Your sensor has this pH output;  4/20 = 0 - 14.   So giving yourself some virtual decimal places, Y1 = 0 and Y2 = 1400.

X is the MI you assigned to the analog input.  This is the argument for the block.  The MI for Y is the block's output, or your scaled value.

2.  If all you want to do is display the timer's value counting up, use the Timer variable and select Elapsed time.  If this is for use in your logic, you'll have to roll your own "timer" using a time pulse such as SB 13 incrementing an MI.  I do this all the time, as it gives me a lot more flexibility on what I do with the value in the MI using compare or reset blocks.

3.  You don't need an SD card for email, but you do need a non-SSL mail server.  These are getting very hard to come by.

Joe T. 

 

  • Like 1
Link to comment
Share on other sites

  • MVP 2023

My read on the pdfs is that the name "combination" may have lead you astray.  I think it is a separate sensor needed for each type of read.  Note the different part no.s for pH or ORP.

I've never seen a sensor with pH and ORP in one unit.  But not saying they don't exist.

cheers,

Aus

Link to comment
Share on other sites

So I have the inputs and outputs all sorted, but the input coming from the sensor is reading as 1024 for sensor A and 0 for sensor B which doesn't seem to make any sense. The sensor is in a pH buffer of 4, but it also stays at exactly 1024/0, which seems off because it should fluctuate at least slightly.

Edit - Added pictures to see if it's something obvious that I'm just missing. I have it set to the 10bit numbers because I'm just using the onboard analog inputs of the V350-35-r34.

The wiring is:

Sensor ---> Pathfinder Transmitter ---> + (Power Supply)
                                                                                         - (PLC Analog Input)
                                                                               GND (GND)

http://pathfinderinstruments.com/ph/orp-transmitters/pathfinder-emit-ph/
http://pathfinderinstruments.com/ph/orp-transmitters/pathfinder-emit-orp/

Transmitters in question.

Sensor Setup 2.PNG

Sensor Setup.PNG

Logic.PNG

Link to comment
Share on other sites

  • MVP 2023

+1 to Hots on the jumpers.   

My experience was only with public swimming pools, but I'm sure that the same principles apply across any installation.  The pH and ORP sensors I used always needed time in the solution to become stable, especially new sensors which could take anywhere up to a few hours to become accurate and were usually way off to start with.

cheers,

Aus

Link to comment
Share on other sites

Okay, so in my haste to get it set up I seem to have forgotten the 250ohm resistor. If that doesn't cause it to be correct then I will try these suggestions and get back to you guys.

 

On 2/10/2018 at 9:07 PM, Ausman said:

+1 to Hots on the jumpers.   

My experience was only with public swimming pools, but I'm sure that the same principles apply across any installation.  The pH and ORP sensors I used always needed time in the solution to become stable, especially new sensors which could take anywhere up to a few hours to become accurate and were usually way off to start with.

cheers,

Aus

We ran them over the weekend as per the instructions on the sensors, so hopefully they should be stable when I test them again.

Thanks for all the help though, definitely a little out of my element with these so it's a learning experience.

Link to comment
Share on other sites

  • MVP 2023

And you definitely have the wiring correct as per page 8 of https://myzone-kza3sadj.netdna-ssl.com/wp-content/uploads/2015/12/Vxxx_J_TR34_R34_INSTAL_GUIDE_11-14.pdf

These sensors must have really good connections due to the miniscule voltages they work with.  I used to actually get rid of the sockets/plugs and direct solder onto the relevant boards on the transmitters.  They are so sensitive that I could run my hands over a protective acrylic cover 30cms in front of them, not electrically connected at all and simply hanging on bolts attached to the same concrete wall, and that would upset readings.   It was one of those things I didn't explore much due to it being stable the rest of the time, but it was thought provoking!

Do you have access to a 4-20ma signal generator?  If none of the above works out, try a known amount via the generator into the PLC.

Aus

Link to comment
Share on other sites

Okay so as an update, the inputs now seem to be correct (I just took all the jumpers out and redid them, I think J3 was actually the issue cause it wasn't in its default state) but now the linearization is not giving me the numbers that I want it to. 

The input numbers are within the range and aren't wavering at all, but the output is not what I would expect it to be. Also after the reset the big negative numbers did not go away.

Edit - Wait I lied ignore the negative number comment, I realize I didn't actually reset it. Those are now gone but everything else is the same.

Linear 1.PNG

Linear 2.PNG

Logic Update.PNG

Link to comment
Share on other sites

5 hours ago, C_R_PLC said:

Of all the stupid issues, yup that was it. Everything is working now! Thank you guys so much for the assistance.

 It's happened to me more than once in the early developmental stage of programming.  Make a subroutine and then forget to call it from the main routine. I've tried to force the habit of calling the subroutine first then builinding it

Link to comment
Share on other sites

  • MVP 2023

This is a classic example of a quirk of Visilogic that REALLY annoys me.  It displays rungs as being live, even if the sub is not being called.  I have whinged about this before.  I repeat that if my old Win95 & DOS programs I've had for 20 years + for other PLCs can differentiate between active and uncalled subs over a 9600, 232 connection, something of Visi's maturity and current use should be able to do it easily.

Even though I love Unitronics, it is a really big failing in my view.

cheers,

Aus

Link to comment
Share on other sites

  • MVP 2023

That's because (as I see it) VisiLogic is not really online with the PLC. All it is doing is looking at every operand and displaying its value onscreen in the VisiLogic program. Red lines are drawn through contacts and connectors (when the bit value would pass power) and red lines are drawn for the ladder rails. This is why you can go online with a completely different program than what's in the PLC and you won't know the difference on your PC screen (except for the logic inconsistencies). It's not a problem if you understand what's going on.

Link to comment
Share on other sites

  • MVP 2023

What you say is true Flex, but I have PLC systems I built over 25 years ago still going and their programs and O/System DO differentiate between such things.  Other more recent models/makes do this as well.  If something made so long ago can do it, why can't the Creators implement it correctly?

1 hour ago, Flex727 said:

It's not a problem if you understand what's going on.

I respectfully disagree here.  Even though I do understand, I shouldn't need  to understand what is going on...the program should correctly display what is going on.  It's akin to being in a car with everything on the dash saying you're moving along nicely, engine ok etc. yet you look out the window and you're not moving!

 

1 hour ago, Flex727 said:

you can go online with a completely different program than what's in the PLC and you won't know the difference on your PC screen

In the past I have also asked for an automatic check of program name matching to counter this issue.  It has caught me out a few times.  I can't see that it would be too hard for online mode to first check if the program in the plc is the same name as the one that you are using.  With a user choice then available to proceed or not.

cheers,

Aus

Link to comment
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...