Technical FAQs

Ask a Question

Can I alter the Register Editor for specific function blocks in ProWORX 32?

Yes, this can be done by editing the functionblock's .UCS file found in \proworx\32\Scripts. The ADD.UCS file below will be used as an example. The exercise is to change the first row's description 'Operand # 1' to 'AddBlock1'.
'Editor.scGetText(1)' is being replaced by "AddBlock"

Sub ADD(TopAddr, MidAddr, BotAddr, TopLen, MidLen, BotLen, Page, Unused1, Unused2)

' Create and resize the new grids
NumRows = 1 'Not including the header.
VisableRows = 1 'Not including the header.

Call Editor.scAddGrid( TopAddr, NumRows, VisableRows)
Call Editor.scAddGrid( MidAddr, NumRows, VisableRows)
Call Editor.scAddGrid( BotAddr, NumRows, VisableRows)

' Fill the row descriptions (GridIndex, GridRow, HeaderString, Radix)
Call Editor.scSetRowInfo( 1, 1 , "AddBlock"+"1" ,"Decimal" ) ' "Operand #1"
Call Editor.scSetRowInfo( 2, 1 , Editor.scGetText(1)+"2" ,"Decimal" ) ' "Operand #2"
Call Editor.scSetRowInfo( 3, 1 , Editor.scGetText(2) ,"Decimal" ) ' "Result"

' Set up the Equation line
Call Editor.scAddEquation( "A + B = C" , "1,1,I" , "2,1,I" , "3,1,I" , "" , "" )

End Sub

Was this helpful?
What can we do to improve the information ?