Jump to content

Simon

MVP 2014
  • Posts

    598
  • Joined

  • Last visited

  • Days Won

    36

Posts posted by Simon

  1. OK, I responded to your other post before seeing this one. Now I see the whole picture. If you need 4 inputs at 12-bit resolution, I would suggest the IO-AI4-AO2. It also gives you 2 outputs that you don't need. The other option is the IO-AI8, which is slightly more expensive, but gives you some spare inputs.

    As I mentioned in my previous post, check the sample rates in the module datasheets. The sample rate can vary depending on how many inputs are being used.

    For the I/O modules, you also need one EX-A2X I/O interface module.

    Depending on your other I/O requirements, you could use the V350-35-B1 if all your I/O is coming from external modules.

  2. Both the following have 14-bit inputs.

    V350-35-RA22

    V350-35-TA24

    The following has 12 or 14-bit selectable.

    V350-35-TRA22

    The trade-off with 14-bit is a slower sample rate compared to 10 or 12-bit inputs.

    There are also the following external I/O modules.

    IO-AI4-AO2 has 12-bit inputs

    IO-AI8 has 12 or 14-bit selectable inputs.

    Going to external modules adds a delay for the module communications in addition to the sample time.

    If sample rate is critical, please check the datasheets for each device to determine the suitability.

  3. Hello Mark,

    I can't see a reference to what model V130 you are working with. If you post that, someone (possibly me, unless the phone goes nuts) can take a look at the jumper settings and wiring in detail and confirm point-by-point that all is correct.

    All V130 have at least 2 analogue inputs (except the B1 version of course) - can you try another input to see if it is the same?

  4. In general I would say you are on the right track, using the sessions and acknowlegement counters, and the Status MI as Keith suggests.

    Also when you lose comms, check your SB150 - 3 Socket Connected. This is one main difference between Modbus Serial and ModbusTCP. If the connection has dropped out, then you need to re-connect your TCP socket before you can re-try the Modbus command.

  5. Presumably the master program reads/writes each slave in turn, and waits for one slave to respond before talking to the next one.

    The issue is most likely the Modbus timeouts and retries. While all slaves are present the cycle is fast becuase each slave answers and allows the master to proceed to the next slave. If one slave is missing, the master waits on the timout and retries before giving up and going to the next slave. The default is 1 second timeout and 3 retries, which gives a delay of 3 seconds.

    There are a few ways of fixing this.

    1. Reduce the timeout and/or retries value. Beware that if you reduce this too far, you will start to see missed communications even when the slave is good. To get the optimum time, reduce the timeout until you see regular missed communications then increase it to maybe 2 or 3 times that value (anyone with experience in the field is welcome to add further comments here).

    2. Set up automatic logic that disables communications to a given slave if it sees more than "X" number of missed communications. It could re-try on a slow cycle (every 1 minute for example) or require manual reset once the slave is confirmed to be back online.

    3. Have a manual process, where the operator can tell the master PLC that slave "X" is offline, so don't try to communicate with it.

    (Posted too slow, between starting and ending my response, Joe got in ahead of me :) )

  6. If you enter a timer value in the box as below that will be the default value of the timer. This value will be loaded when the program is first downloaded to the PLC, but can be changed by the user through the keypad entry you have set up. Thje PLC will revert to the default value only if the battery goes flat or you "initialise" the PLC (this can be done via Visilogic or the info screen).

    Don't tick the box to the left, with the power plug icon, or that will force the PLC to take on this value every time it powers up.

    post-16-0-13138500-1345419778_thumb.png

  7. If you change the battery without powering down, then you don't lose the RAM information. This has only been possible since the introduction of the separate battery compartment (V530/570/1040/1210).

    I understood the above post to say that the transition of SB8 from low to high is immediate, as soon as the battery is low (which agrees with my experience). So the "battery low" condition is detected in a timely manner. However the transition from high to low is only updated on power-up.

  8. Getting back to the question of counter speed, you say it is 10,000 pulses per second, which is equal to the maximum speed of the M91-2-T1 ( note the max input speed usually relates to the raw pulse frequency not the decoded quadrature count frequency)

    It would be helpful to check that you get 8000 counts per rev just by a simple test, without turns counting logic. Then we can isolate whether the problem is the encoder interface or the turns counting logic.

    You can test this by turning the encoder more slowly and see if the count is more accurate.

    You may not get to the maximum speed possible if the pulses from the encoder are not a clean squarewave (for example they can become slightly triangular (trapezoidal) or suffer other distortions).

    I hope this helps

  9. I have a couple of suggestions that may get you moving again, even if they do not idenitify the root cause.

    1. Download a new, blank project to the PLC

    2. Download a simple project that only contains the Ethernet initialisation, and see if that allows you to communicate over ethernet

    3. Get an SD card and transfer the project to SD card then use that to load the project onto the PLC. Your file size of 50MB may be causing problems for the download process. Using SD card will also be much faster.

    It must take a long time to download that file via serial port...

  10. The Unitronics PLCs can output data in various formats, over RS232, RS485 or Ethernet. These would be the most likely interfaces for a POS (point of sale) machine.

    The first big question is what kind of interface does the credit card POS machine have? I presume they have an interface to take data from other POS equipment, like cash registers.

    The other question would be to check if there are any special security protocols required.

  11. Ahhhh, the "Z" pulse.

    The ony way to capture this at anything resembling full accuracy is to use a second high-speed counter and monitor it with an interrupt. You are still limited by the interrupt speed, so it is not possible to reset the main count exactly when the Z-pulse occurs.

    Is it possible to use an absolute encoder with parallel binary output? This makes the Z-pulse irrelevant, as you are always reading the position directly as a number. For a 1024 pulse encoder, you just needs 10 digital inputs, all from the same I/O module.

  12. I would try the 2.509ms Interrupt function. Search "interrupt" in the helpfile.

    You will never get what you want using the basic scan time of the PLC and the internal timers. You already know the internal timers are liited to 10ms resolution. The jitter you see is almost certinaly due to the scan time, which can be at least 10ms for a simple program. The timer output is only evaluated once per scan.

  13. So as I see it the problem is that you can't reset the linked MI value via ladder.

    Have you also tried using a Store Direct to store zero? This should be the same as the ---[R]--- numeric, but you never know unless you try.

    I don't think the Immediate functions work on the Expansion I/O, only the Snap modules. I have had some troubles trying to clear counter MIs in the past, but the exact circumstances are a bit vague in my memory.

    The catch-all solution is to use the following sequence.

    Copy counter MI to a new MI

    compare new MI to a buffer copy (from the last scan)

    if they are different set a bit to flag that a count has been detected.

    Copy the new MI into the buffer copy (ready for the compare on the next scan)

    The linked MI on the input will keep counting forever, but this logic will detect as soon as it changes by 1 or more counts between scans.

    Another option is to configure the counter with Reset and use digital outputs from the I/O module to pulse the hardware reset line.

    I hope this helps,

  14. Hi Ron,

    It looks like you are dealing with an analogue signal, correct?

    By my calculations, the best you can expect with a 5V source and 290Ohm total load is 17.2mA. So at 19mA you are getting a better result than you "should" be. You need a load of 250Ohm to get 20mA at 5V. There is no way to do this with the setup you describe.

    Either you adjust the span in the PLC with a Linear block, or add a signal conditioner to take the 0...5V input and output it as 4...20mA to suit the PLC

    I hope this helps.

  15. For my two cents worth, regarding antenna, I would suggest high-gain Omni directional. Expecially since it is on a mobile platform. With a yagi it needs to be aimed at the tower, which may not be practical on a vehicle.

    We have had the discussion about extending the SD card in relation to mining applications as well. Really the SD card ends up being a permanent memory expansion, not a removable storage in these kind of outdoor situations.

    I have also toyed with the idea of using RFID tags. The PLC can be programmed to load the data onto the tag when placed near the read/write head, also with some touch screen interaction. Then also have a reader on the PC to retrieve the data. It would require some intensive programming to set up initially, and is limited by the available tag memory, but also has some nice features including robustness. You could interface via Ethernet, or possibly CAN.

  16. Hi Joe, I would expect TTL data to be High for a "1" and Low for a "0". However the first post in this thread indicates the signal is continuously pulsing, and the pulses are 4ms long for a "1" and 2ms long for a "0".

    It looks like a special type of signal, so I don't think a TTL to RS232 convertor would work.

    It may work by using the 1.25ms interrupt on the V130 and use a normal digital input. If the signal is high for 1 or 2 interrupts then it is a "0" and if high for 3 or 4 interrupts it is a "1". However I would test, as this is playing at the limits of what is possible.

    You will also need a fast solid state relay to bring the signal up to 24VDC for the PLC to detect it.

  17. SI4 automatically catches the divide remainder.

    I have certinaly hit this wall also. Trying to hold the middle ground between overflow on large numbers and rounding errors on small numbers can be a real juggle.

    If you just need to file a new edge onto your pliers to use them as a socket wrench then it's not so bad, if all you have is pliers. If you find you are melting down the pliers to cast them in to the shape of a socket wrench then it has probably gone too far...

×
×
  • Create New...