I’m new to Epicor and I’m trying to implement a barcode system. I would like to be able to start activity with a 1d barcode. The issue is that when you enter the job number there is a delay/pause in the drop downs to load the Assembly and operation on the Start Production Activity screen. Has anyone tried to accomplish something similar to this?
Thank you.
I’ve not tried it yet, but if the ‘tab’ character embedded in the barcode isn’t enough to make it work, then could you take the whole barcode value into a custom field and break it apart in the FieldChanged event to fill in the other fields? I can think of a few ways using customization+code combinations.
I’ve done this a few times for client projects, using a concatenated barcode with the tab character between Job and Assembly, and between Assembly and Operation on tethered scanners. On one project, the scanner read the barcode faster than the system could take it. I ended up using an application called 123Scan from Zebra to program a keystroke delay between characters on the scanner. Took a little trial and error to get the right delay but now it works well. The 123Scan app is also great for creating and saving the right set of configuration settings that can then get loaded into all your other scanners.
I second concatenated barcode is the way to go, but run a trace and build the logic yourself in a customization vs trying to use delays.
Create a single field, split the concatenated barcode up on leave (add a scan suffix of tab to the scanner hardware itself not the barcode), and run the same logic epicor would if you entered it in field by field. way faster, most reliable. An EFX would be great for this if you’re on a version that supports it.
Yes, I remember some delays that could take long enough that the scanner time out. And the older the system (the more jobs) the worse the delays. I believe the ( significant ) delay usually only occurred on the first activity to be started after a fresh MES session was launched.
But… I believe that once the combo is initially populated, there were no more dropdown delays as long as MES remained open?
Yes, I have also used the concatenated bar code
In addition I have also needed to customize the start activity form to get around any delay. ( an old version V8 - with many many jobs since they never purged )
e.g. I ended up adding my own controls so I could bypass the “dropdown delay issue”
That customization looks interesting, do you still have the code that you use? Or the steps to re-create it?
Thank you
Sorry I only have a preliminary VB example from an old V8 Test system.
TBD if helpful but… if I remember the coding wasn’t too hard. most of the “fiddling” was spent in getting the tab order on the form to match the custom bar code on the job traveler. If you search this site I think you’ll find several good examples of concatenating bar codes.
'//**************************************************
'// Custom VB.NET code for StartProdForm - Vantage 8
'//// Workaround for job combo auto-retrieve "Lagging"
///// Ref Job Traveler - custom bar code with tabs
'//// i.e. scanning the bar code should populate the 3 intermediate UD fields
'//// Temp - manual processing button click
'////// Copy UD values to "normal" Start Activity fields
'///// Pending - add auto processing (scan only - no manual clicking )
'//**************************************************
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Sub InitializeCustomCode()
edvStart = CType(oTrans.EpiDataViews("Start"), EpiDataView)
End Sub
Private Sub btnProcessScan_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnProcessScan.Click
Try
'// START edvStart - copy scanned values to UD fields for corresponding activity values
edvStart = CType(oTrans.EpiDataViews("Start"), EpiDataView)
Dim sJobScan As String = edvStart.dataView(edvStart.Row)("ShortChar01").ToString()
Dim iAsmScan As Integer = edvStart.dataView(edvStart.Row)("Number01")
Dim iOpScan As Integer = edvStart.dataView(edvStart.Row)("Number02")
If (sJobScan > "") Then
edvStart.dataView(edvStart.Row)("JobNum") = sJobScan
End If
If (iAsmScan > 0) Then
edvStart.dataView(edvStart.Row)("AssemblySeq") = iAsmScan
End If
If (iOpScan > 0) Then
edvStart.dataView(edvStart.Row)("OprSeq") = iOpScan
End If
oTrans.Update()
' Optional - automatically click the "OK" button
' dim btnOK as EpiButton
' btnOK = CType(csm.GetNativeControlReference("0025fc115-fee3-4973-946e-ba209189d62e"), EpiButton)
' btnOK.Focus()
' SendKeys.Send("{Enter}")
' Optional - form close
Dim frm As Epicor.Mfg.UI.App.StartProductionActivityEntry.StartProdForm = Ctype(csm.GetNativeControlReference("2dcd1674-5e34-4d98-b493-c75747027376"), Epicor.Mfg.UI.App.StartProductionActivityEntry.StartProdForm)
frm.Close()
' StartProdForm.Close()
Catch ex As Exception
End Try
End Sub
I created an EpiTextBox and a button to process the barcode input (update data views). I edited the Job Traveler SSRS report to include Job Number-Assembly-Operation on the barcode (being split by a dash “-“ and no spaces), I also have enabled Full ASCII mode on my barcode scanner so I can put a tab and enter ("$I" + “$M”) at the end of the barcode so it automatically presses the process button after filling out the EpiTextBox with the correct information.
Then I use the following custom code to process the barcode:
using System.Linq;
public class Script
{
// ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ Comments! **
// Begin Wizard Added Module Level Variables **
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
EpiButton Process_Barcode = (EpiButton)csm.GetNativeControlReference("f1780d90-4de6-48ea-ac3c-ecff73a21ad8");
Process_Barcode.Click += new EventHandler (Process_Barcode_Click);
// End Wizard Added Custom Method Calls
}
public void DestroyCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
// Begin Wizard Added Object Disposal
// End Wizard Added Object Disposal
// Begin Custom Code Disposal
Process_Barcode.Click -= new EventHandler (Process_Barcode_Click);
// End Custom Code Disposal
}
private void Process_Barcode_Click(object sender, System.EventArgs args)
{
//** Place Event Handling Code Here **
EpiTextBox txtJob;
txtJob = (EpiTextBox)csm.GetNativeControlReference("ae85cc21-3a48-41aa-b9c3-75760ea262b2");
txtJob.Focus();
if (String.IsNullOrEmpty(txtJob.Text) == false)
{
try
{
var barcode = txtJob.Text;
var items = barcode.Split('-').ToList();
string job = items[0].ToString();
string asm = items[1];
string opr = items[2];
// transfer data to fields
var view = ((EpiDataView)(this.oTrans.EpiDataViews["Start"]));
if(view.Row >=0)
{
// Fill Job Number
view.dataView[view.Row].BeginEdit();
view.dataView[view.Row]["JobNum"]=job;
view.dataView[view.Row].EndEdit();
// Fill Assembly Sequence
view.dataView[view.Row].BeginEdit();
view.dataView[view.Row]["AssemblySeq"]=asm;
view.dataView[view.Row].EndEdit();
// Fill Operation Sequence
view.dataView[view.Row].BeginEdit();
view.dataView[view.Row]["OprSeq"]=opr;
view.dataView[view.Row].EndEdit();
//Update view for resource information
oTrans.NotifyAll();
//Clear Textbox for another scan
txtJob.Text = "";
//Focus on field for new scan
txtJob.Focus();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}
}