ngoodman Posted December 7, 2010 Share Posted December 7, 2010 HI I have programmed a weighing station - some data is entered from a barcode scanner - no problems and some from a vernier caliper - both read as a keyboard via usb - no issues here but on one screen I have created an on screen keyboard using the keyboard symbols from the symbol library - looks very nice - the user has to enter 2 entries a line number and a product. For security none of above entries are available as a keyboard entry - really so connecting a keyboard will not allow access to the program.. or able to quit the program - this makes the daqfactory onscreen keyboard unusable. (a previous similar system suffered from operators pressing f4 and then quitting the program - to get to the internet after hours - possibly? a security risk in any case.. The action on the on screen keyboard button adds a value to a variable keyentry. //routine to accept key entry this is invoked when the enter key is touched // if(entry==0) line.addvalue(keyentry) endif if(entry==1) product.addvalue(keyentry) endif (this is only part of the code. the enter key increments the entry variable to move the entry on to the next value) the keys have the following action. this is quite cool as blank keys can be used to enter dual charactors such as BW and BLK both used in our product names. keyentry+="A" // enters the letter A (other keys other letters....// One problem I cannot program a backspace - is this possible? I tried the chrA(8) command and it entered a non printing charactor . Nigel Link to comment Share on other sites More sharing options...
AzeoTech Posted December 7, 2010 Share Posted December 7, 2010 What you want is not to add a backspace character, but to remove the last item. Is "line" or "product" a channel or a variable? BTW: if you start DAQFactory with the -f flag, it will start in full screen and won't let you hit F4. However, your solution is probably the most bulletproof, especially if used in combination with a keyboard lockout tool. Link to comment Share on other sites More sharing options...
ngoodman Posted December 8, 2010 Author Share Posted December 8, 2010 Thanks for reply both "product" and "line" are variables not channels. one other question we have established a remote connection to another copy of daqfactory to read back results for display on the scada stystem all works but connection is now slow to some modbus devices which now time out - can the update time for the remote connection be controlled to limit bandwidth. when the remote connection is removed the timeout stops. this is not a full stream connection either!! Link to comment Share on other sites More sharing options...
AzeoTech Posted December 8, 2010 Share Posted December 8, 2010 If they are variables, then you can remove the last character by doing: line = line[0,numrows(line)-2] As for your second question, are you sure the remote connection isn't also trying to communicate with the devices? Link to comment Share on other sites More sharing options...
ngoodman Posted December 10, 2010 Author Share Posted December 10, 2010 Could not get that solution to work. However; what I did was create an array as long as the input window called Key [] On start up this is initialised with all Link to comment Share on other sites More sharing options...
AzeoTech Posted December 10, 2010 Share Posted December 10, 2010 OK. I'm not quite sure why you didn't just use a string variable instead of an array. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.