Export/Copy DINT Value as Bits/BOOLs to Excel

AMarks95

Member
Join Date
Jul 2018
Location
South Dakota
Posts
224
Hey everybody,

I have a bunch of bits used for diagnostics all compiled into a couple of DINTS. I have an x-ref sheet in Excel that aligns explanations for each bit of the DINT in columns. Is there any way to copy/export to column of BOOL values that make up the DINT and paste into a column in Excel?

I've considered using a DDE connection with RSLinx to directly link to the tags, but the computer that I go online with the controller with is on a VM that does not have an Office license, so no Excel access to the tags.
 
So you want to convert the DINT values back to BOOLs in the sheet, one bool in each column (or row)?


It's trivial with e.g. Python, assuming there is a driver to get the DINTs.


EDIT: I am not really sure what you are trying to do, and what the various pieces are e.g. if the computer that has RSLinx cannot run eXcel, where will eXcel be run?
 
Last edited:
E.g. would it be good enough to enter the DINTs into a couple of cells in a worksheet, and have some formulas to convert those DINTs into their composite bits, one bit per cell adjacent to it x-ref?
 
So you want to convert the DINT values back to BOOLs in the sheet, one bool in each column (or row)?


It's trivial with e.g. Python, assuming there is a driver to get the DINTs.


EDIT: I am not really sure what you are trying to do, and what the various pieces are e.g. if the computer that has RSLinx cannot run eXcel, where will eXcel be run?

E.g. would it be good enough to enter the DINTs into a couple of cells in a worksheet, and have some formulas to convert those DINTs into their composite bits, one bit per cell adjacent to it x-ref?
That could work.

My initial though was, when you expand the DINT data type in Logix 5000 you can see each of the bits (0 or 1) in a column. I've set up my Excel sheet to match. So, it'd be nice if I could just copy/paste that full column of 0's and 1's into a column in Excel.

Typing in a number and converting to a column of 0's and 1's is probably my best bet and is acceptable for this use. Thanks for the suggestion.
 
That could work.

My initial though was, when you expand the DINT data type in Logix 5000 you can see each of the bits (0 or 1) in a column. I've set up my Excel sheet to match. So, it'd be nice if I could just copy/paste that full column of 0's and 1's into a column in Excel.

Typing in a number and converting to a column of 0's and 1's is probably my best bet and is acceptable for this use. Thanks for the suggestion.


and you should be able to copy/past the DINT into a cell.
 
Mind sharing the formula for splitting the DINT into 32 bits?

I see it at the top now.


Here is the text for copy/paste:

Code:
=IF(BITAND(B$1+IF(B$1<0,2^32),2^[COLOR=Blue][B]MID($A2,4,2)[/B][/COLOR])>0,"On","Off")
P.S. You may need to do summat else for the bit in blue.

P.P.S. that is LibreOffice, so YMMV.

The only non-formula cells are Row 1 (DINT row) and A2 ("bit31:"). A3 ("bit30:") and below look like this:
Code:
=CONCATENATE("bit",RIGHT(CONCATENATE("0",MID(A2,4,2)-1),2),":")
 

Similar Topics

Hello. does anyone know how I can export my HMI project (in this case an MP277) from SIMATIC manager, so I can open it with WinCC flexible 2008...
Replies
2
Views
6,528
Trying to export a Modern application for an upgrade to Intouch 2020 but I cannot export the application from the 2014 version because the export...
Replies
2
Views
108
Hello, Does anyone know how to export the EDD files for a device in DeltaV Explorer 12.3? I can export the .fhx, but I have no idea how to get...
Replies
8
Views
132
Hi, I'm trying to export data from a DataGrid to Excel using VBA, but I'm getting an error "Object doesn't support this property or method". The...
Replies
0
Views
81
Hello to all, Is it possible to export Codesys symbols to .txt, .csv or .xml in a similar manner like exporting symbol table in STEP 7? For...
Replies
0
Views
130
Back
Top Bottom