Converting BOOL to DINT

rywins

Member
Join Date
Feb 2013
Location
Philadelphia
Posts
29
Is there anyway to convert a BOOL to a INT (DINT or SINT) in ladder logic. I am working in RSLogix5000 and am attempting to count 4 Discrete Inputs and count how many of the four are true.

I was attempting to use the CPT function but it requires a DINT input.

Thanks
 
Brute force method the easiest

CLR Count
XIC BOOL1 ADD 1 Count Count
XIC BOOL2 ADD 1 Count Count
XIC BOOL3 ADD 1 Count Count
XIC BOOL4 ADD 1 Count Count

Count now contains the number of BOOLs that were on
 

Similar Topics

Dear Experts, I need to send Boolean array from PLC (1769-L19ER) to device which recieve only float data. So, How can I convert Bool array to...
Replies
4
Views
2,229
Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
200
Hello PLCs Forum, I am in a bit of a pickle and was hoping someone could offer me some help. I have a .rss file and just need to see the ladder...
Replies
2
Views
113
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
295
Hello, did anybody know, if there exist an converting cable like the1492-CM1746-M01 (for an 1746-IB16 to an 5069-IB16), for an 1746-HSCE to an...
Replies
3
Views
381
Back
Top Bottom