selecting multiple analog values

RClem

Lifetime Supporting Member
Join Date
Nov 2010
Location
Pennsylvania
Posts
110
I have a problem with selecting and transferring analog commands from 4 joysticks to an output controlling a common proportional valve. I have 2 of the joysticks interlocked so that only one may operate at a time, two are able to operate simultaneously with an averaged signal. The program is transferring a signal only from joystick number 2 to the output. This is for a water hydraulic valve block that is providing 4 directional functions with a main inlet proportional throttle valve. I have attached a pdf of my code. I am programming in TIA portal v12 with a 315-DP2 CPU. Thanks for your time.

Rich
 
I've done this in the past with multiple speed potentiometers on a line, whichever was the last one used takes control.

Basically, I just look at all of the analog inputs every scan, and if any of them exceeds a (relatively small) delta from the last scan, I assume somebody is moving it. Once that is detected, just unlatch control bits enabling the other inputs, and latch one enabling the one that was just operated.

I've always nicknamed this type of thing a "Wiggle Selector", since wiggling the pot (or joystick) switches the selection.

This can be a lot easier if your analog input card can signal on a rate of change event, since then you don't have to do the comparison logic yourself.
 
I'll have to keep that idea in mind, I think I'm definitely over-complicating this. I'm thinking now I might be able to simply average all command inputs since the directional outputs of the joysticks are interlocked, and I need two functions to be able to operate simultaneously anyways.
 

Similar Topics

Hi, I'm working on Mitsubishi MR-J5-70A amplifier, and need some advice on selecting fuse size. Main power is 1ph 240VAC, and in the manual, it...
Replies
1
Views
57
I am working on trying to create a an HMI program where the user can select a value from 1-25 and then enter a string, which will be placed into...
Replies
5
Views
1,085
We had a servo motor feedback cable get damaged recently and we want to order a replacement. The current cable is a custom made cable, and we...
Replies
1
Views
898
Not sure how to word the title but here's my scenario. We have a carriage that moves at high speed with an energy chain and the cable bends in a...
Replies
11
Views
2,872
Hello plctalk, new guy here. I have an application that I'd like to present for your considered opinions so I can figure out what hardware I...
Replies
11
Views
2,516
Back
Top Bottom