Jump to content

cantcliff

MVP 2015
  • Posts

    146
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by cantcliff

  1. Have you calculated how much data you're actually producing to see if it's worth it to worry?

     

    I only ask because I have CSV files I've been generating over the last year where each line contains 50-60 characters, including commas.  I have 302,000 lines of data which only make up 17MB of file space.  With 8GB I could hold roughly 143,800,000 lines of data which would take me 476 years to generate at the current pace.

     

    You're more likely to run into file system file size limits with and SD card as FAT32, depending on the version is limited to 2GB, 4GB, or 256GB.  Most likely you're going to be limited to 2GB or 4GB on the SD card base FAT32 file system.

     

  2. Keep in mind the way the PLC cycle works may be something you can use to your advantage.

     

    All inputs are read at the beginning of the cycle (Including CANBus), then your logic is processed, outputs are written, HMI is written, and communications happens.

     

    You could create a controlled with an integer, to control which I/O analog module you're reading from, then increment your control variable to read from the next one, then reset it to start from the first again.

     

     

    My personal preference, I have a single subroutine to handle Digital Input, one subroutine for analog input (All I/O modules referenced in one and including scaling of the input to a usable variable), both called at the beginning of my main routine, that map the input to an integer, bit, or long as required.  Multiple subroutines to handle logic, then at the end a subroutine for analog output, and one for digital output, that map a single integer, bit, or long to the correct output.  It makes for some larger ladder segments, but, it's a fairly universal setup you can copy to multiple styles of PLC without issue and it simplifies remapping if an I/O point dies. It also gives you a lot of modularity with your ladder logic for moving between projects.  Which, depending on how many you work on, can be a huge boon.

    It increases scan time slightly, but the communications portion of the cycle has the largest effect on scan time.  My current project reads 8 analog I/O, 16 input, and 32 output and I sit somewhere between .5-1ms based on the scan time integer.

  3. One possible issue may be your MI value, are you scaling it? If so, does your constant scale correctly?

     

    Use as much precision as you can.  Say you're reading in the analog input and scaling it from 1-10 volts.  You lose a lot of precision from rounding as integers don't hold anything right of the decimal.

     

    If you're using an integer I recommend ensuring your scale is set to 1000-10000, your precision now becomes 1.000 to 10.000, then you have to scale your constant to match.  IE, 10 becomes 10000 in your comparison function.

     

    Also, keep in mind, MB 50 may be updating hundreds of times per second and the value may not hold true each time it updates and you may not see it turn "red" unless you have some sort of latch to hold your state on.

     

    As Dan said as well, something else may be turning 50 off later as well, though you should see a warning when you build and test the code.

     

    It would be useful to see a screen shot of the rungs used to control your comparison and your output, or a copy of the program.

     

    -Chris

     

    *Edit*

     

    An easy way to verify the output is working is to put all constants into your comparison block, but based on the information given, you have logic/programming error somewhere.

  4. I use a based template for most projects that pre-maps all the discrete I/O for me in a subroutine.  I also standardize the order of the modules I put into the setup.

     

    Programmatically, it's rather ugly, but it allows for quick re-mapping if an I/O point fails without having to wade through the logic of what I'm copying or moving.

     

    Both ways work great, just a matter of what you expect to happen down the road.

     

    For analog I/O there should be an option under hardware configuration that allows you to specify the MI or ML you want to store the analog I/O into.  I know this works for the IO-AI8 expansion module.

  5. The one listed in the subroutine may be required by the software, but you should be able to add additional RETs to the subroutine.

     

    Have you tried adding an additional rung with your conditions and adding a second RET function to it?

     

    Reference Page 34 of the Ladder Programming PDF, or the help system in visilogic shows an example of what I mean.

  6. There is an example program included with Visilogic for using the EX-RC1. I would look at that first.

     

    You're going to use the UniCAN protocol to communicate with the EX-RC1.

     

    I don't have experience running one yet, but this link: http://www.unitronics.com/forum_old/topic.asp?TOPIC_ID=1336  from an old topic may help.

     

    *edit*

     

    Also I just stumbled on the following link this morning:

     

    http://www.unitronics.com/e_Learning/EX-RC1/index.htm

  7. From my training I understand that direct coil actions are always placed on the right hand side of the rung.

     

    While attempting to solve as issue with a co-workers logic I noticed several coils run inline with contacts.

     

    Instead of: 

     

    ----|/|----| |----|/|----(  )----(/)----

     

    His ladder contains rungs like this:

     

    ----|/|----(  )----| |----|/|----(/)----


    1) Visilogic does not produce any errors or warnings but will this cause unexpected behavior at compile/upload to the PLC?

     

    2) I know Allen Bradley PLCS treat serial or parallel coils identical is this the same with the Unitronics PLC Vision series?

     

  8. I highly recommend using some sort of a calibrated orifice if this is for any type of production application to understand the leak rate combined with volume.

    Depending on the test volume, how you're stabilizing your pressures, and you're test resolution you may be passing bad parts.  

    We use a much higher tolerance for leak testing parts, typically <1 sccm @ 45 psi and cycle times run around 15 seconds total for a single tester to run a reliable leak test.  The total test volume is fairly small compared to a spray type bottle.

×
×
  • Create New...