Initial Problem: Customer says the C: Drive on their “MC-Bii” with a “P200 PNC2” is filling up with MM.PBU files, and that there is not enough drive space, for their Anti-Virus to update.
Initial Problem: Customer says the C: Drive on their “MC-Bii” with a “P200 PNC2” is filling up with MM.PBU files, and that there is not enough drive space, for their Anti-Virus to update.
The Initial Problem: The customer has bought 2 Okuma MACTURN 550′s with steady rest options. They have some older 550′s that have had a problem with the “ZB” Axis Covers. It seems that it’s possible to move the B Turret too close to the steady rest, causing the covers to be crushed, or to move the B Turret too far from the steady rest causing the covers to be pulled apart. The Sales Department wants a solution to this, but in order to get the fix from Okuma an RFEQ must be submitted, and so begins a lengthily process of getting a design change from the OEM .
This is a brief overview of the Servo Door we did on a Genos 250.
For years I’ve been wanting to create a more user friendly I/O monitor application for the P control. If you’ve ever tried to quickly look up a signal on a machine you know what a pain in the neck it can be. If you don’t happen to have all of the signals memorized you either have to page through the slaves in physical mode or go find the electrical drawing. Oh, and don’t forget the search is case-sensitive. So I decided to make my own just for fun.
There is no way to get the names of all of the signals on the Okuma through the API. there is also no way to read the status of an I/O signal by the symbol name. A generic set of I/O names won’t work because the mapping of the I/O signal addresses change from model to model. The around this problem is to use the IOTXTOUT.EXE tool to generate a CSV file.
This command will generate a CSV file with this format:
Date=20120928,Time=080854
ID=IX Logical Input
Addr,Bit,A,Msk,St,Label,Comment
0,0,,,0,ipNCST,NC start ..PB
0,1,,,1,ipNTS_B,NC feed hold/ .PB
As you can see the top of the file contains a timestamp followed by a section header, in this case inputs, followed by the column headers. The columns we care about are the Address(Addr), Bit, Logical/Physical(A) , Label and comment
Now that I had the data I wanted to find a way to quickly search this file to pull out the information needed. There are a few different ways I could have gone with this and I’m not sure this is the best but I decided to use Matt Perdeck’s cool LinqToCSV libray. This allowed me to write LINQ queries over the data in the CSV file.
Before I could use LINQ to query the data I had do clean up the CSV file. The first problem is that the file generated by the IOTXTOUT tool prints out a line for every potential I/O point not just the ones which are mapped. As a result at least 50% of the lines contain no useful data. As this will inevitably slow down any query I wanted to remove all of the blank data lines. The other problem is that the tool generates section titles and headers for each type of I/O so I also had to remove them as well. The LinqToCsv has no idea what to do with column headers which show up in the middle of the data.
rtnIoList = _OkIoContext.Read(Of OkumaIOPointInfo)(FilePath, _inputFileDescription)
Now after all this the the end result is that we can do queries like this on our data:
Dim InputsThatContainDoor = From iop In _IOList
Where iop.Comment.Contains(“Door”) AndAlso iop.IOType = 0
Select iop
Public Interface Iokuma
Function GetIoBitStatus(Signal As OkumaIOPointInfo) As Boolean
Function GetMachineType() As enumMachineType
Sub close()
End Interface
I have 3 classes which implement the IOkuma interface. One for a mill, one for a lathe and the other for off machine simulation. This allows me to program against the IOkuma interface on the MainWindow rather than creating a new Window for each of the three scenarios.
<ListBox x:Name=”lbIO” HorizontalAlignment=”Left” Width=”393.183″ ItemsSource=”{Binding}” Margin=”0,0,10,5″ VirtualizingStackPanel.IsVirtualizing=”True” SelectionMode=”Multiple”>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<local:uc_IoPoint Margin=”5″/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
I attempted to use the Costura VS addin to embedded all of the required Dll’s into the exe. For some reason the Okuma Dll’s refuse to be loaded from via stream. If anyone has any insight on this I would be very grateful (test project). I would eventually like to get it down to a single file executable. For now it is the Okuma IO.exe and the Okuma DLL files.