// ******************************************************************
// * OS: HHR Program Loader 4.20.exe
// * HHM: HHR Manager version 4.20
// *
// *
// *
// ******************************************************************
// 20/01/2013 LEIDS
/////////////////////////////////////////////////////////////////////
//
// LEIDS Sheep Reading Program
//
// //////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
HEADER
LEIDS
23/01/2012
19:40:20
dd/mm/yyyy
hh:mm:ss
,
LOG_true
.
BT_false
GL_section
animal_true
ISO_EID_frame
END
TABLE
LOC;S;0;1;1;$$\$$$\$$$$;;
LOT;S;0;1;1;&&&&;;
EID;A;1;1;1;0000000 00000;;
EIDH;H;1;1;1;&&&&&&&&&&&&&&&&;;
DATE;D;0;1;1;0000000000;;
TIME;T;0;1;1;00000000;;
FARM;S;0;1;1;&&&&&&&&&&&&&&&&&&&&&&;;
CINC;S;0;1;1;$$$$;;
QTY;S;0;1;1;$$$;;
ACTION;S;0;1;1;&&&&&&&&&&&&&&&&&&&&&&;;
END
LOG
LLOC;S;0;1;1;$$\$$$\$$$$;;
LLOT;S;0;1;1;&&&&;;
LEIDH;H;1;1;1;&&&&&&&&&&&&&&&&;;
DATE;D;0;1;1;0000000000;;
TIME;T;0;1;1;00000000;;
LCINC;S;0;1;1;$$$$;;
END
GLOBAL
1:1
2:832385544
3:Genoch Mains
4:1
5:Dectomax
6:06
7:07
8:08
9:09
10:10
11:114
//
END
//NOT MORE 30 CHAR !!!!!!! max 3 lines (max 2x '/')!!!!!
MESSAGE
//
END
PRINT
//*******//printout HEX //***********************************
begin_printout:HEX
[r
#(LF)#(CR)
r]
end_printout
begin_printout:FLOCK
#(LF)#(CR)
#(LF)#(CR)
Action#(SP)#(SP)#(LF)#(CR)
#(LF)#(CR)
//----------------------------#(LF)#(CR)
CPH:#(SP)#(SP)#(LF)#(CR)
----------------------------#(LF)#(CR)
Farm:#(SP)#(SP)#(LF)#(CR)
#(LF)#(CR)
----------------------------#(LF)#(CR)
Ser UK Number Batch No#(LF)#(CR)
----------------------------#(LF)#(CR)
[r
#(SP)#(SP)UK#(SP)[ex.dec(table.EIDH,11,12)]#(SP)#(LF)#(CR)
r]
#(LF)#(CR)
#(LF)#(CR)
Total Records:#(SP)#(SP)[ex.range]#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
Date:#(SP)#(SP)#(SP)[ex.date]
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
end_printout
//*******//printout Flock //***********************************
// * Flock/Move *************************
begin_printout:FLOCKMOV
#(LF)#(CR)
#(LF)#(CR)
------------------------------#(LF)#(CR)
#(LF)#(CR)
Records:#(SP)[ex.range]#(LF)#(CR)
------------------------------#(LF)#(CR)
Ser UK Number Batch/Lot#(LF)#(CR)
----------------------------#(LF)#(CR)
[r
[ex.count]#(SP)#(SP)#(SP)#(SP)UK#(SP)[ex.dec(table.EIDH,11,12)]#(SP)#(SP)#(LF)#(CR)
r]
------------------------------#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
Movement: ON / OFF
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
Destination: _ _ _ _ _ _ _ _ _
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
Veh Number: _ _ _ _ _ _ _ _ _
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
Signature: _ _ _ _ _ _ _ _ _ _
#(LF)#(CR)
#(LF)#(CR)
Date:#(SP)#(SP)#(SP)#(SP)[ex.date]
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
#(LF)#(CR)
end_printout
// * FLOCKMOV*************************
//
END
MACRO
//*******// macro EVENT //***********************************
begin_macro:EVENT
begin_action_area
SetFilter(table.LOT)
ReadNew_p(table.EIDH)
Inc(table.CINC,0)
FillExp(table.LOT,global(0))
FillExp(table.LOC,global(1))
FillExp(table.FARM,global(2))
FillExp(table.QTY,global(3))
FillExp(table.DATE,date())
FillExp(table.TIME,time())
FillExp(table.ACTION,global(4))
end_action_area
//screen 1.1
begin_screen
PrintText(0,0,2,"Batch Qty:")
EditGlobal(63,0,2,3,$$$)
PrintText(0,12,2,"Batch No:")
EditGlobal(63,12,2,0,$$$)
PrintExp(90,0,2,noofrec(table))
PrintText(100,0,2,"/")
PrintField(108,0,2,table.QTY)
PrintText(0,26,2,"Action:")
EditGlobal(45,26,2,4,&&&&&&&&&&&&&&&&&&&&&&)
PrintText(0,40,2,"UK")
PrintExp(20,40,2,dec(table.EIDH,11,12))
PrintText(0,51,2,"Total:")
PrintExp(40,51,2,count(table.*))
IconDelete(58,51,table,0)
IconList(83,51,table.EIDH,0)
end_screen
begin_control_area
Copy(table)
end_control_area
end_macro
begin_macro:MOVE
begin_action_area
SetFilter(table.LOT)
ReadNew_p(table.EIDH)
Inc(table.CINC,0)
FillExp(table.LOT,global(0))
FillExp(table.LOC,global(1))
FillExp(table.FARM,global(2))
FillExp(table.QTY,global(3))
//Join(table.LOC,log.LLOC)
//FillExp(log.LLOT,global(1))
FillExp(table.DATE,date())
FillExp(table.TIME,time())
end_action_area
//screen 1.1
begin_screen
PrintText(0,0,2,"Lot Size:")
EditGlobal(55,0,2,3,$$$)
PrintText(0,12,2,"Lot:")
EditGlobal(25,12,2,0,$$$)
PrintExp(90,0,2,noofrec(table))
PrintText(100,0,2,"/")
PrintField(108,0,2,table.QTY)
PrintText(0,30,3,"UK")
PrintExp(20,30,3,dec(table.EIDH,11,12))
PrintText(0,51,2,"Total:")
PrintExp(40,51,2,count(table.*))
IconDelete(58,51,table,0)
//IconPrint(83,51,PGRP_HEX,FIL,FILTER)
IconList(83,51,table.EIDH,0)
end_screen
begin_control_area
Copy(table)
end_control_area
end_macro
//Macro with new LoopReadNew function for speed reading
begin_macro:SPEED_READ
begin_action_area
SetFilter(table.LOT)
LoopReadNew_p(table.EIDH)
Inc(table.CINC,0)
FillExp(table.LOT,global(0))
FillExp(table.LOC,global(1))
FillExp(table.FARM,global(2))
FillExp(table.QTY,global(3))
//Join(table.LOC,log.LLOC)
//FillExp(log.LLOT,global(1))
FillExp(table.DATE,date())
FillExp(table.TIME,time())
end_action_area
//screen 1.1
begin_screen
PrintText(0,0,2,"Batch Qty:")
EditGlobal(63,0,2,3,$$$)
PrintText(0,12,2,"Batch No:")
EditGlobal(63,12,2,0,$$$)
PrintExp(90,0,2,noofrec(table))
PrintText(100,0,2,"/")
PrintField(108,0,2,table.QTY)
PrintText(0,30,3,"UK")
PrintExp(20,30,3,dec(table.EIDH,11,12))
PrintText(0,51,2,"Total:")
PrintExp(40,51,2,count(table.*))
IconDelete(58,51,table,0)
//IconPrint(83,51,PGRP_HEX,FIL,FILTER)
IconList(83,51,table.EIDH,0)
end_screen
begin_control_area
Copy(table)
end_control_area
end_macro
//*******// macro Speed Read and output to Decimal//***********************************
begin_macro:SPEED
begin_action_area
LoopReadNew_p(table.EIDH)
Print(DEC,current,0)
end_action_area
begin_screen
PrintText(25,40,2,"Speed Reading")
PrintText(0,0,0,"REC:")
PrintExp(21,0,0,noofrec(table))
PrintText(113,0,0,"1.1")
PrintText(53,0,0,"OF:")
PrintExp(69,0,0,count(table.*))
DrawLine(0,6,127,6)
PrintText(0,7,2,"Batch:")
EditGlobal(40,7,2,0,&&&&&&)
PrintText(65,7,2,"Total:")
PrintExp(105,7,2,count(table.*))
//EditCounter(103,7,2,0)
DrawLine(0,20,127,20)
PrintText(0,28,3,"UK")
PrintExp(20,28,3,dec(table.EIDH,11,12))
end_screen
begin_control_area
end_control_area
end_macro
///+++++Macro to read and output the Tag number in Hex
begin_macro:WEIGH
begin_action_area
ReadNew_p(table.EIDH)
Print(HEX,current,0)
end_action_area
begin_screen
PrintText(0,0,0,"REC:")
PrintExp(21,0,0,noofrec(table))
PrintText(113,0,0,"1.1")
PrintText(53,0,0,"OF:")
PrintExp(69,0,0,count(table.*))
DrawLine(0,6,127,6)
PrintText(0,7,2,"Batch:")
EditGlobal(36,7,2,0,&&&)
PrintText(62,7,2,"Total:")
PrintExp(103,7,2,count(table.*))
//EditCounter(103,7,2,0)
DrawLine(0,20,127,20)
//PrintText(0,21,3,"UK")
PrintField(1,21,3,table.EIDH)
end_screen
begin_control_area
end_control_area
end_macro
begin_macro:MOVE_PRINT
begin_action_area
Sorting(table.LOT)
end_action_area
begin_screen
DrawLine(0,6,127,6)
PrintText(0,7,2,"Move Print Menu:")
DrawLine(0,20,127,20)
PrintText(0,23,2,"UK")
PrintExp(20,23,2,dec(table.EIDH,11,12))
PrintText(0,39,2,"Print Lot:")
EditGlobal(75,39,2,0,&&&&)
IconPrint(108,39,FLOCKMOV,table.LOT,0)
PrintText(0,51,2,"Print all:")
PrintExp(50,51,2,count(table.*))
IconPrint(108,51,FLOCKMOV,table.all,0)
end_screen
begin_control_area
end_control_area
end_macro
begin_macro:ACTION_PRN
begin_action_area
Sorting(table.LOT)
end_action_area
begin_screen
DrawLine(0,6,127,6)
PrintText(0,7,2,"Action Print Menu:")
DrawLine(0,20,127,20)
PrintText(0,23,2,"UK")
PrintExp(20,23,2,dec(table.EIDH,11,12))
PrintText(0,39,2,"Print Batch:")
EditGlobal(75,39,2,0,&&&&)
IconPrint(108,39,FLOCK,table.LOT,0)
PrintText(0,51,2,"Print all:")
PrintExp(50,51,2,count(table.*))
IconPrint(108,51,FLOCK,table.all,0)
end_screen
begin_control_area
end_control_area
end_macro
//*******// macro DATE TIME //***********************************
begin_macro:DATE
begin_action_area
end_action_area
begin_screen
PrintText(0,10,2,"Time:")
SetTime(40,10,2)
PrintText(0,25,2,"Date:")
SetDate(40,25,2)
DrawLine(0,63,127,63)
end_screen
begin_control_area
end_control_area
end_macro
//*******// macro BTON Bluetooth on //***********************************
// settings: BT_true
begin_macro:BTON
begin_action_area
end_action_area
begin_screen
PrintText(0,0,0,"RECORDS:")
PrintExp(46,0,0,count(table.*))
PrintText(115,0,0,"2.1")
DrawLine(0,6,106,6)
IconBT(107,0)
PrintText(0,8,1,"BlueTooth:")
SetBTOnOff(67,8,1)
PrintText(0,18,1,"Name:")
SetBTName(43,18,1)
PrintText(0,28,1,"Pin code:")
SetBTPin(55,28,1)
PrintText(0,38,1,"MAC:")
SetBTMAC(33,38,1)
PrintText(0,48,1,"Mode:")
SetBTMode(38,48,1)
DrawLine(0,63,127,63)
end_screen
begin_control_area
end_control_area
end_macro
begin_macro:DELTAB
begin_action_area
end_action_area
begin_screen
DelTable()
end_screen
begin_control_area
end_control_area
end_macro
begin_macro:FARM_SETUP
begin_action_area
Sorting(table.LOC)
end_action_area
begin_screen
PrintText(0,0,2,"Enter Details:")
PrintText(0,13,2,"CPH:")
EditGlobal(45,13,2,1,$$\$$$\$$$$)
PrintText(0,25,2,"Farm:")
EditGlobal(0,38,2,2,&&&&&&&&&&&&&&&&&&&&&&&)
end_screen
begin_control_area
end_control_area
end_macro
begin_macro:MAN_ENTRY
begin_action_area
FillAddRec(table)
Inc(table.CINC,0)
FillExp(table.LOT,global(0))
FillExp(table.LOC,global(1))
FillExp(table.FARM,global(2))
FillExp(table.QTY,global(3))
FillExp(table.DATE,date())
FillExp(table.TIME,time())
FillExp(table.CINC,count(table.CINC))
end_action_area
begin_screen
IconAddRec(105,0,table,1)
PrintText(0,0,2,"Batch Qty:")
EditGlobal(63,0,2,3,$$$)
PrintText(0,12,2,"Batch No:")
EditGlobal(63,12,2,0,$$$)
//PrintExp(70,0,2,noofrec(table))
//PrintText(80,0,2,"/")
//PrintField(88,0,2,table.QTY)
PrintText(0,30,2,"VID UK")
EditMaskedField(37,30,2,table.EID)
PrintText(0,51,2,"Total:")
PrintExp(40,51,2,count(table.*))
end_screen
begin_control_area
//Copy(table)
end_control_area
end_macro
begin_macro:CHANGE_LOT
begin_action_area
SetFilter(table.LOT)
ReadSeek(table.EIDH)
//Inc(table.CINC,0)
FillExp(table.LOT,global(0))
FillExp(table.LOC,global(1))
FillExp(table.FARM,global(2))
FillExp(table.QTY,global(3))
FillExp(table.DATE,date())
FillExp(table.TIME,time())
end_action_area
//screen 1.1
begin_screen
PrintText(0,0,2,"Batch Qty:")
EditGlobal(63,0,2,3,$$$)
PrintText(0,12,2,"Batch No:")
EditGlobal(63,12,2,0,$$$)
PrintExp(90,0,2,noofrec(table))
PrintText(100,0,2,"/")
PrintField(108,0,2,table.QTY)
PrintText(0,30,3,"UK")
PrintExp(20,30,3,dec(table.EIDH,11,12))
PrintText(0,51,2,"Total:")
PrintExp(40,51,2,count(table.*))
IconDelete(58,51,table,0)
//IconPrint(83,51,PGRP_HEX,FIL,FILTER)
IconList(83,51,table.EIDH,0)
end_screen
begin_control_area
Copy(table)
end_control_area
end_macro
END
MENU
M0:{Read Animals,M1};{Speed Read,M2};{Print,M3};{Setup,M13}
M1:{Record Event,M10};{Man Entry,M11};{Movement,M12};{Change Lot,M15}
M2:SPEED_READ
M3:{Action Print,M4};{Move Print,M5};{Weigher,M9}
M4:ACTION_PRN
M5:MOVE_PRINT
M6:FARM_SETUP
M7:BTON
M8:DATE
M9:WEIGH
M10:EVENT
M11:MAN_ENTRY
M12:MOVE
M13:{Delete Table,M14};{Blue Tooth,M7};{Date/Time,M8};{Farm Details,M6}
M14:DELTAB
M15:CHANGE_LOT
END
START_SCREEN
begin_screen
PrintText(0,0,0,"SHEEP EID SOFTWARE")
DrawLine(0,8,127,8)
PrintText(10,15,4,"Livestock EID")
DrawLine(0,56,127,56)
PrintVersion(0,58,0)
end_screen
END
//NOT MORE 30 CHAR !!!!!!! max 3 lines (max 2x '/')!!!!!
WARNING
w_WAIT:0^Please/wait!
w_UNIQUE:This value/must be unique!
w_NOEDIT:This value/is NOT editable!
w_NOTNULL:This value/must be not null!
w_LOWBATTERY:Low battery!
w_CHARGEBATTERY:Battery/charging!
w_NOT_FREE_MEMORY:No free memory!
w_NOT_STORED:NOT STORED!
w_STORED:Saved!
w_DATE_GOOD:Date changed.
w_DATE_NO_CHANGE:Date not/changed.
w_DATE_NOT_GOOD:Wrong date!
w_TIME_GOOD:Time changed.
w_TIME_NO_CHANGE:Time not/changed.
w_TIME_NOT_GOOD:Wrong time!
w_NOTAG:S1^No Tag found.
w_READING:Reading Tag.
w_SHUTOFF:Closing!
w_USBCONNECTED:USB/connected!
w_NEW_REC:0^New record/created!
w_CHOICE:Choice:
w_FIND:Find:0^
w_TAGNOTFIND:S3^Tag/not found!
w_TAGEXIST:S3^Tag/already exists!
w_YES:YES
w_NOT:NOT
w_ADD_REC:Do you want/to add/new rec.?
w_DEL_REC:Do you want/to del/cur. rec.?
w_UNKNOWN_MES:Unknown/message!
w_VALEXIST:This value/already exist!
w_BTACTIVE:2^Bluetooth/is activated.
w_BTNOACTIVE:Bluetooth/is closed.
w_ON:Turn on.
w_OFF:Turn off.
w_MEMORY:MEMORY:
w_RECSTORE:New record/stored!
w_RECNOSTORE:New record/not stored!
w_NOFIND:Value/not found!
w_NOANIMAL:No animal code!
w_COUNTRY:Wrong country code!
w_NEW_LOG:0^New Animal
END