Fieldpine Logo Documentation Home  

Machines Documentation

Machines are a way you can extend and customise the processing in Fieldpine POS, reports and other places. A machine performs a dedicated function, such as fetching product information, or calculating tax totals, or even deciding if discount vouchers can be applied to a sale.

PosGreen (Windows)

PosGreen is able to directly call machines as symbols, or processing commands.

Using on User Interfaces

Machines can be placed on the User Interface to provide constant feedback to the user

screen example
 total(Voucher Valid: %data.machine.(name(CanVoucherApply) pin(101,15966)).pin200%)
 font(arial,26,bold) noborder at(6,678,225,708) rgb(300,0,0)

Using in Script

<fpscript name="machine_example_1">
	// First create the machine and set the input pins.  Sale is automatically loaded
	set t = machine(name(CanVoucherApply) pin(101,15966) pin(107,"31-mar-2015"))

	// Now just read the output pins we are interested in
	if (%t.pin200%)
		message(99,1,No problems - no voucher OR acceptable)
		if (%t.pin204% == 22) message(99,1,Voucher has expired)


PosGreen includes an interactive machine viewer. This allows you to constantly run a machine and observe its operation while changing other things in the POS. This can dramatically lower testing time by allowing you to interactively try various combinations without having to fully complete them in all cases.

Method 1 uses the POS Designer tool. Select "View" "Machines" from the designer panel.

Method 2 allows you to issue a POS-Command to display a single machine. You may issue the command multiple times and display several machines at once. The PosCommand is:

 debug(machine,name(...) pin(...) pin(...) )

Individual Machines

Advanced Topics

  1. Machines that use a long processing time can cause problems if used with user interaction as they can block the user, seemingly without reason. Machine designers should avoid potentially long operations such as network IO
  2. Customer supplied machines can be created for special purposes.