Koyo Do-More PLC Digital/Analog Inputs

MannyH

Member
Join Date
Jul 2016
Location
Florida
Posts
4
Hello all, I am a recent graduate at my first job tasked with a PLC project. I need to control a linear actuator given feedback from several limit/interlock switches and safety mats (D.I), and also from an analog signal which is a position-sensing potentiometer on the actuator. From the university I have some experience programming embedded control systems with microcontoller units, and I have a little experience modifying some Allen Bradley PLC ladder logic programs during a previous internship.

We have chosen the Do-More line of PLC's by Koyo from Automationdirect.com. The hardware has not arrived yet, but I have downloaded their free programming environment and have been studying their instruction set trying to figure out the best approach for programming this. I am having a hard time figuring out how to manipulate the i/o available on the controller. For example, if I was doing this on an Arduino-type language, I would write an infinite loop that goes through and constantly reads each sensor using functions like analogRead() and digitalRead(). Those values would be stored in variables, which would then be used throughout the program to control the process.

Looking through the instruction-set available I don't see any instructions to simply read the current value of an input pin on the controller and store it in a variable. At the end of this post I will list the instructions available under the "Analog/Process" section of the instruction-set. I have a feeling that I am missing something fairly straightforward. Any assistance that can be given to guide me in the right direction will be greatly appreciated.

Thanks,
Manny

Instruction Set:
ALDEV - Deviation Alarm
ALHILO - High/Low Alarm
ALRATE - Rate of Change Alarm
CLAMP - Limit Range
DEADBAND - Set Outside Deadband
FILTER - First-Order Filter
INTEGRAT - Integrate Over Time
PID - Closed Loop Controller
PIDINIT - Set PID Tuning Constants
RAMPSOAK - Ramp Soak profile
SCALE - Scale Value
SLOPE - Calculate Slope
TIMEPROP - Time Proportional Control
 
Think of the PLC as already having (when in 'run') an infinite loop operating. It reads the input modules - presenting their conditions in the X (for discrete inputs) or WX for full word (usually analog) inputs.

Control then passes to the program you write. Do not attempt to force a loop within the program, Just process and set output states as needed.

After your instructions have run the system will apply your states to the actual physical output cards.

The system will then start over reading inputs.

There is system maintenance and communication taking place also.

The cycling of the system (check out the 'scan time' statistic) is very fast and, for most cases, is more than fast enough to qualify as real-time.

Welcome to PLC programming.
 
Bernie, thank you very much for your quick response. That makes a lot more sense. i just looked into the X, WX, and Y memory locations that are being constantly updated with the current input/output values. Now my question is: is there an intuitive way to store the value of an input at a specific point in time, then use that value at a later time?

I am working on a calibration sequence, where the "calibrate" button is pushed, and the actuator begins to travel down until it reaches the "down" limit switch. At that point I would like to store the current value of the analog input, tell the actuator to go up until it reaches the "up" limit switch, and then again store the value of that same analog input in a different location. These "up" and "down" values from the analog input would go through some math functions, and be stored for later use. We want to make the actuator stop short of the limit switches via the analog feedback, and use the switches as backup.

I apologize if I am getting too detailed with my actual application, I am new to this forum and am not familiar with the etiquette. Thanks again!
 
Now my question is: is there an intuitive way to store the value of an input at a specific point in time, then use that value at a later time?

I am working on a calibration sequence, where the "calibrate" button is pushed, and the actuator begins to travel down until it reaches the "down" limit switch. At that point I would like to store the current value of the analog input, tell the actuator to go up until it reaches the "up" limit switch, and then again store the value of that same analog input in a different location. These "up" and "down" values from the analog input would go through some math functions, and be stored for later use. We want to make the actuator stop short of the limit switches via the analog feedback, and use the switches as backup.

Welcome to the forum.

try something like this
Code:
           Cal UP Switch
             X0
[FONT=Courier New]-----------] _|- [---------------+ MOVE 
                                 |  WX0                <- your analog
                                 |  V0                 <- cal at UP
                                 +------------    
          [/FONT]Cal DOWN Switch
             X1
[FONT=Courier New]-----------] _|- [---------------+ MOVE 
                                 |  WX0[/FONT][FONT=Courier New][FONT=Courier New]                <- your analog[/FONT]
                                 |  V1                 <- cal at DOWN
                                 +------------  

Of course, use you own addresses.
You can do it in the DoMore Simulator.
[/FONT]
 
Thank you sir. This is exactly what I was looking for. The feedback that I got from you and Bernie has given me a much better idea of how I will move forward with this. I have not experimented with the DoMore Simulator, but I will definitely learn more about this, since the controller and other hardware won't arrive for several more weeks.

The next thing that I need to acquaint myself with is program organization. I understand that PLC's work with a 'main' program and 'subroutines' which resemble a 'function' in a traditional programming language. I imagine that we would want to write the program flow under 'main' and then have ways of 'calling' the different subroutines which may or may not return a value back to main.
 
As a note, the Do-more at this point does not have subroutine calls which interrupt the current logic processing to execute the subroutine logic then return. As I understand it, this is planned in later firmware/software revisions. At present the programs/tasks called are marked for execution when the scan reaches them. You may wish to check more in the program help files or with the forum at http://forum.hosteng.com/index.php.
 

Similar Topics

Dear All, I have requirement of data logging and printing to prepare the invoice for the process data from the Cmore or koyo plc or atleast a...
Replies
2
Views
4,555
I need this screen creator for GC-53 software to get an program from GC-53 MHI KOYO , Please help me.
Replies
0
Views
95
I have a c-more micro with a three digit input box on one of the screens. This is being written to a memory location in a DL05. I don't have the...
Replies
3
Views
109
Hey, I am entirely new to PLC's and am trying to help my friend with a project. He wants to take the signal from a PNP photoelectric sensor as...
Replies
12
Views
2,236
I have an OPC Server (Kep) pulling tags from an AB 1769-L36ERM and a few different Koyo PLCs (450, 454). On the HMI (FTV SE) there's one screen...
Replies
4
Views
1,487
Back
Top Bottom