Parky

MrPLC Member
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Parky

  • Rank
    Hi, I am New!

Profile Information

  • Country United Kingdom
  1. new in plc:s

    If I get you right first of all is the humidity sensor analogue if so you will need a card for the sensor i.e. 4-20ma & a second card for the PT100 however if you use a PT100 to 4-20ma converter you only need one card either a 2 or 4 way analogue card. Depending on the cards you use you will need to scale the values into meaningful values i.e. 0-100 Deg C & 0-100% humidity (Note: THe PT100 Card is scaled at 0.1 Degree unless set within the program. The plc does have a real time clock that will be set to your PC current time when you download the PLC Parameters these Start at D8013 registers You can compare the temp/humidity with set values & turn on what you need based on set times/parameters.  
  2. Simple Project vs Structured Project

    A Structured project is the best way to go, It allows you to create functions & blocks you can call multiple times & saves you programming the same code many times. It actually still creates the equivalent of a single block of ladder, however by using the same instance of a function block it actually passes the values for input parameters to temporary memories (these are actually M & D registers in the higher limits (so don't use them as set in the compiler settings) jumps over the end instruction  runs the code, passes any output variables to temporary memories & jumps back to the main program where the output memory is updated. For example A function block with 2 input parameters & one output parameter in code goes: Load D200 Transfer D4000 (temporary memory) Load D201 transfer D4001 Call P2000  (pointer to function) L D4002 T  D202 (move result to D202) ju P400  (Pointer) rest of code ....... FEnd  (End of ladder) P2000: L D4000 L D4001 Multiply Transfer D 4002 Return End So it's really like one block of code but as the FEND instruction is the end of what would be the ladder scan, function blocks are code in an area that is not normally scanned but can be jumped to & returned many times. It allocates the temporary memory addresses and pointers at compile time . Very useful if you have say many motors or valves with auto/manual & status information in a program, you write the function once then call it for as many you require but use the same instance name i.e. Motor_Control., if you use a different instance it creates a subroutine for every one & increases amount of memory used.