|
@@ -695,20 +695,20 @@ namespace IMCS.CCS.Services
|
|
}
|
|
}
|
|
//放入恒轮工位,作为启动
|
|
//放入恒轮工位,作为启动
|
|
string currentWorkStation = "";
|
|
string currentWorkStation = "";
|
|
- if (req.url == "192.168.11.150" && req.data.Location == "127")
|
|
|
|
|
|
+ if (req.url == "192.168.11.150" && (req.data.Location == "127" || req.data.Location == "128"))
|
|
{
|
|
{
|
|
string workStationAddress = ToolUtils.AddressConvertDBW("DB200.332");
|
|
string workStationAddress = ToolUtils.AddressConvertDBW("DB200.332");
|
|
currentWorkStation = ((ushort)s7.Read(workStationAddress)).ConvertToShort().ToString();
|
|
currentWorkStation = ((ushort)s7.Read(workStationAddress)).ConvertToShort().ToString();
|
|
//string currentWorkStation = s7.ReadInt16("DB200.332").Content.ToString();
|
|
//string currentWorkStation = s7.ReadInt16("DB200.332").Content.ToString();
|
|
- string writeValue = "128";
|
|
|
|
- if (currentWorkStation == "1")//工作台1
|
|
|
|
- {
|
|
|
|
- writeValue = "128";
|
|
|
|
- }
|
|
|
|
- else if (currentWorkStation == "2")//工作台2
|
|
|
|
- {
|
|
|
|
- writeValue = "127";
|
|
|
|
- }
|
|
|
|
|
|
+ //string writeValue = req.data.Location;
|
|
|
|
+ //if (currentWorkStation == "1")//工作台1
|
|
|
|
+ //{
|
|
|
|
+ // writeValue = "128";
|
|
|
|
+ //}
|
|
|
|
+ //else if (currentWorkStation == "2")//工作台2
|
|
|
|
+ //{
|
|
|
|
+ // writeValue = "127";
|
|
|
|
+ //}
|
|
if (string.IsNullOrEmpty(req.data.fileName))
|
|
if (string.IsNullOrEmpty(req.data.fileName))
|
|
{
|
|
{
|
|
s7.Close();
|
|
s7.Close();
|
|
@@ -720,7 +720,7 @@ namespace IMCS.CCS.Services
|
|
string proNo = Path.GetFileNameWithoutExtension(req.data.fileName);
|
|
string proNo = Path.GetFileNameWithoutExtension(req.data.fileName);
|
|
s7.Write("DB200.334", Convert.ToInt16(proNo));
|
|
s7.Write("DB200.334", Convert.ToInt16(proNo));
|
|
Thread.Sleep(SLEEP_TIME);
|
|
Thread.Sleep(SLEEP_TIME);
|
|
- s7.Write("DB200.46", Convert.ToInt16(writeValue));
|
|
|
|
|
|
+ s7.Write("DB200.46", Convert.ToInt16(req.data.Location));
|
|
Thread.Sleep(SLEEP_TIME);
|
|
Thread.Sleep(SLEEP_TIME);
|
|
s7.Write("DB200.50", Convert.ToInt16("4"));
|
|
s7.Write("DB200.50", Convert.ToInt16("4"));
|
|
}
|
|
}
|