/// <summary> /// Turns off display, leds on the specified node /// </summary> /// <param name="gateway">Gateway id</param> /// <param name="node">Node id. (252 is for all nodes)</param> public bool ClearNode(int gateway, int node) { if (CapsAPI.AB_GW_Status(gateway) != 7) { return(false); } CapsAPI.AB_LB5A_DspStr(gateway, -node, "", 0, 0, -3); return(true); }
/// <summary> /// Displays the number on the specified Node. /// </summary> /// <param name="gateway"> Gateway id</param> /// <param name="node"> Node id. (252 is for all nodes)</param> /// <param name="quantity"> The number to display </param> /// <param name="direction"> The direction to which PTL should point. Lights up the up/down arrows</param> /// <param name="Dot"> each bit for every dot. 0: off, 1: on </param> /// <param name="Interval"> 0: normal display; -1: blinking with default frequency; >0: set blinking frequency (by msec); -2: turn off digit; -3: turn off digits and lamp</param> /* public bool DisplayQuantity(int gateway, int node, int quantity, Direction direction, byte Dot, int Interval) * { * if (CapsAPI.AB_GW_Status(gateway) != 7) * { * return false; * } * CapsAPI.AB_LB_SetMode(gateway, -node, 0); * byte x = 1*1 + 2*0 + 4*1 + 8*1 + 16*1 + 32*1 + 64*0; * int res = CapsAPI.AB_TAG_mode(gateway, -node, 0, x); * * CapsAPI.AB_LB5A_DspNum(gateway, -node, quantity, (byte)direction, Dot, Interval); * return true; * } * * /// <summary> * /// Displays the number on the specified Node. * /// </summary> * /// <param name="gateway"> Gateway id</param> * /// <param name="node"> Node id. (252 is for all nodes)</param> * /// <param name="disp_string"> The string to display </param> * /// <param name="direction"> The direction to which PTL should point. Lights up the up/down arrows</param> * /// <param name="Dot"> each bit for every dot. 0: off, 1: on </param> * /// <param name="Interval"> 0: normal display; -1: blinking with default frequency; >0: set blinking frequency (by msec); -2: turn off digit; -3: turn off digits and lamp</param> * public bool DisplaySeries(int gateway, int node, string disp_string, Direction direction, byte Dot, int Interval) * { * if (disp_string.Length > 6) * { * disp_string = disp_string.Remove(0, disp_string.Length - 6); * } * while (disp_string.Length < 6) * { * disp_string = " " + disp_string; * } * * if (CapsAPI.AB_GW_Status(gateway) != 7) * { * return false; * } * CapsAPI.AB_LB_SetMode(gateway, -node, 0); * byte x = 1 * 1 + 2 * 0 + 4 * 0 + 8 * 1 + 16 * 1 + 32 * 1 + 64 * 0; * int res = CapsAPI.AB_TAG_mode(gateway, -node, 0, x); * * CapsAPI.AB_LB5A_DspStr(gateway, -node, disp_string, (byte)direction, Dot, Interval); * return true; * } */ /// <summary> /// Puts the device in stock mode and displays the number on the specified Node. /// </summary> /// <param name="gateway"> Gateway id</param> /// <param name="node"> Node id. (252 is for all nodes)</param> /// <param name="quantity"> The number to display </param> /// <param name="direction"> The direction to which PTL should point. Lights up the up/down arrows</param> /// <param name="Dot"> each bit for every dot. 0: off, 1: on </param> /// <param name="Interval">0: normal display; -1: blinking with default frequency; >0: set blinking frequency (by msec); -2: turn off digit; -3: turn off digits and lamp</param> /// <param name="maxCountDigits"> Specify the maximum number of digits allowed to modify </param> public bool DisplayStockQuantity(int gateway, int node, string quantity, Direction direction, byte Dot, int Interval, byte maxCountDigits) { if (CapsAPI.AB_GW_Status(gateway) != 7) { return(false); } CapsAPI.AB_LB_SetMode(gateway, -node, 1); byte x = 1 + 0 + 4 + 8 + 16 + 32 + 0; int res = CapsAPI.AB_TAG_mode(gateway, -node, 0, x); CapsAPI.AB_TAG_CountDigit(gateway, node, maxCountDigits); CapsAPI.AB_LB5A_DspStr(gateway, -node, quantity, (byte)direction, Dot, Interval); return(true); }