Studio 5000 Make your own BCD?

LoganB

Lifetime Supporting Member
Join Date
Apr 2017
Location
Michigan
Posts
607
Studio 5000 v24.11 on a 1769-L33ERM

Pretty simple question today! I have a piece of testing hardware with four outputs wired to four inputs on my PLC. The testing hardware sends different BCD values to the PLC based on the test result. I want to convert those four inputs into an integer value in the PLC.

I know I can brute force it with 16 lines of logic, one for each possible outcome, but is there an easier/shorter/neater way to do this? Haven't had my coffee yet this morning :angr:

TIA!
 
BTW, I already tried to directly activate bits in a DINT and that didn't work.

Code:
   Input.0                        INT.0
-----]  [----------------------(  )-----------

The outputs don't activate...
 
However, upon further examination, the outputs DO activate once you put a JSR in place. :oops:

Now off to get that coffee
 
I am lost, are you done or still asking for another solution vs 16 rungs?

In case you need solution:
If input 16 bits, output 16 bits (INT) then use: COP (Input, Output, 1)
If input 16 bits, output 32 bits (DINT) then use: BTD (Input, 0, Output, 0, 16)
 
The inputs will directly activate the bits of the INT in the program, so I have my solution. I had my solution before, I just forgot the JSR. You'd think eventually that little mistake would go away with experience, but somehow it keeps on sneaking back into my life :ROFLMAO:
 

Similar Topics

Good Evening , I purchased Studio 5000 Standard a few weeks ago . I know Studio goes down only has far has version 20. I need to go down to...
Replies
8
Views
4,653
Hi guys , I'm new with Allen Bradley, but I have experience with Tia portal (s7 1200 ,s7 1500) I want to convert my project from Tia portal to...
Replies
0
Views
2
Hi everyone, I have an issue with installation of Studio 5000 33.00.02 DVD Media disc 2 with View Designer on Windows 11. After installation...
Replies
0
Views
67
Anyone have problems/solutions with Rehosting Studio 5000 to a new computer. Our IT department successfully Rehosted 2 laptops, but the other 2...
Replies
1
Views
117
Hi, I'm quite new to Rockwell PLC and currently trying to implement the following if Sw1 then for i:=1 to 20 by 1 do xEnable := 1...
Replies
4
Views
140
Back
Top Bottom