Programming and stuff

jeebusmn

Member
Join Date
Feb 2007
Location
hOUSTON
Posts
11
I have a few questions.

I read that someone here was trying to program a plc to play a guitar and it caught my interest so I am giving it a go. I am planning on using solenoids on the rift and a few stepper motors to do the strumming.

The PLC that I picked up is a automation direct PLC06. I wanted this model specifically because it can put out a pulse train for my stepper motors and there is enough to play with that I can probably use it on another project aka Christmas lights in sync with Christmas songs.

So, last night I hooked it up and it works. I was just glad that I didn't burn out any of the inputs or outputs while hooking up the 120 ac to power it up and sinking/sourcing setups for the input and outputs.

One of the weird things though not totally unexpected that I ran into was that I got two different results from two logically equal setups. I first had two separate rungs running to two y16 coils. The program would glitch and wouldn't do as I wanted it to but when I ORed the two rungs together it worked perfectly.

So basically my question is is this the result of the plc not executing the entire ladder at once? Does it execute the rungs top to bottom or do certain things get priority? From what I saw, last night it seemed like it executed everything associated with one rung simultaneously. Is this true? How do you usually avoid race conditions that create chatter or random results?

Dealing the project I am working on-

What are some good stepper motors that I can use?
Where can I find some cheap solenoid piston actuators?

my output is rated max of 1 amp / points. Is this 1 amp total for all the points or 1 amp for each point?
 
Last edited:
I've never used the PLC06, but I've used other direct logic products (the koyo PLCs). They execute one rung at a time left to right top to bottom. In fact, i believe you will find that is true of almost all PLCs. Modicon PLCs running 984 LL will actually execute top to bottom THEN left to right. If any PLCs execute the entire code at once, I'm not aware of them. In pretty much any PLC, if you have the same coil on 2 rungs, the last rung to get solved is going to take priority, the first one will basically get ignored. At least, as far as you'll be able to tell. The first one will actually be executed, and the output will be set accordingly, but that will only last until it gets to the second output.


Project sounds neat. I should do something like that. I'm always telling people I can make a PLC sing and dance if i want to. I was only talking about making music with the relays clicking though.



-jeff
 
That's right. They are continually evaluated throughout the program scan, but they are only written to the output hardware at the end of the scan.

Typical PLC Cycle:
Read Input hardware
Scan program
"Housekeeping" stuff
Write Output hardware

If you have the same output coil twice - yes, it will technically be evaluated both times it's scanned, but only the "last" one will be written to the hardware.
 
my output is rated max of 1 amp / points. Is this 1 amp total for all the points or 1 amp for each point?
It is 1 Ampere per point, and for some module types there is an additional curent limit of Max Current per module. The DL-06 Expansion Module Relay Ouputs are an example.

No, it is not kosher to use two iterations of the same output. There are many ways around this. Add a branch to your ladder and put the second set of logic in parallel with the first on the new branch. Another way is to use intermediate internal programm relays (C0, C1, and so on on the DL-06), with the output being controlled by the two or more internal relays.
 
Last edited:

Similar Topics

Hello All, I am stumped on how to convert a %MW to a %MF using Machine Expert Basic and a Modicon M221. The help files show a word to a double...
Replies
4
Views
156
Hi, I am trying to set up a plc. I've never done any programming with ladder logic previously. I'm trying to set up a a program to turn a device...
Replies
7
Views
261
Dear all, I have fx2n plc on my hand but I don't have the programming cable sc-09 and it would not be easy for me to get one. I need the cable...
Replies
3
Views
143
Hi all, i am the new controls guy at the plant and i have inherited a pc from the previous controls guy with Siemens tia portal version 16 and 17...
Replies
20
Views
974
I need to pull the program off of an old 90-30 so I can convert it to Allen Bradley. This is my first time messing with GE and I don't have the...
Replies
2
Views
100
Back
Top Bottom