Fasthotrod
Member
Just wanted to drop in and say thanks to everyone that has helped me get my project working so far.
Progress has been slow as this is my first attempt at setting up a PLC, but I AM making SOME progress.
So far, I have been able to read the memory registers in my E/G controller and I can use Data View in DirectSOFT5 to see the information.
Here's a picture of my 'test bench' for those interested:
The red/white/black wires in the upper-left corner are just 5k pots used to simulate the coolant temperature and oil pressure at the engine. I can change the value of the pot and watch the controller and PLC respond.
Now I'm jumping into the Analog output devices to see about reading the PLC memory locations and sending out a 0-5VDC output, as well as how to switch the PLC relays in response to individual bits in a 16-bit word.
Quick question: I need to switch my PLC relay outputs based on the individual bits from the word in memory. Tell me if you think I am on the right track:
I read register 41500 in the E/G controller as a 16-bit word. Each bit represents an event code:
0 = Emergency Stop
1 = Overspeed
2 = Overcrank
3 = High Coolant Temperature
4 = Oil Pressure Shutdown
etc...
I load that register into memory at location V2150, and I can see the bits change in Data View, so I know they are activating in response to an alarm.
The Data View looks like this:
What I think I need to do is setup my individual relay outputs such that when the binary total in V2150 = "some number" it activates the relay(s) and sets off my alarm(s).
For example, an "Oil Pressure Shutdown" would be bit 4, or binary = 16. When V2150 = 16, turn on relay output Y4. If I had multiple alarms, say "Overspeed" and "Oil Pressure Shutdown" then V2150 would be binary = 18. Only certain numbers would toggle each relay... but I would need to tell the relay what those numbers are exactly, correct?
Is there an easier way of doing this? Can I tell a relay output to respond to an individual bit instead?
Let me know what you think.
Thanks!
Mark
Progress has been slow as this is my first attempt at setting up a PLC, but I AM making SOME progress.
So far, I have been able to read the memory registers in my E/G controller and I can use Data View in DirectSOFT5 to see the information.
Here's a picture of my 'test bench' for those interested:
The red/white/black wires in the upper-left corner are just 5k pots used to simulate the coolant temperature and oil pressure at the engine. I can change the value of the pot and watch the controller and PLC respond.
Now I'm jumping into the Analog output devices to see about reading the PLC memory locations and sending out a 0-5VDC output, as well as how to switch the PLC relays in response to individual bits in a 16-bit word.
Quick question: I need to switch my PLC relay outputs based on the individual bits from the word in memory. Tell me if you think I am on the right track:
I read register 41500 in the E/G controller as a 16-bit word. Each bit represents an event code:
0 = Emergency Stop
1 = Overspeed
2 = Overcrank
3 = High Coolant Temperature
4 = Oil Pressure Shutdown
etc...
I load that register into memory at location V2150, and I can see the bits change in Data View, so I know they are activating in response to an alarm.
The Data View looks like this:
What I think I need to do is setup my individual relay outputs such that when the binary total in V2150 = "some number" it activates the relay(s) and sets off my alarm(s).
For example, an "Oil Pressure Shutdown" would be bit 4, or binary = 16. When V2150 = 16, turn on relay output Y4. If I had multiple alarms, say "Overspeed" and "Oil Pressure Shutdown" then V2150 would be binary = 18. Only certain numbers would toggle each relay... but I would need to tell the relay what those numbers are exactly, correct?
Is there an easier way of doing this? Can I tell a relay output to respond to an individual bit instead?
Let me know what you think.
Thanks!
Mark