Overview

The Broadcast class creates messages about a part that is being manufactured. There are two classes of messages. The first class is messages about meaured values within the process. Messages in this class are called program content. The second class is messages about the current state of the process. Messages in this class are called program context.

Program content messages contain information about key variables of the CNC control. For example, the current feedrate which may or may not be the same as the programmed feedrate. Every CNC includes a number of variables describing the current state of the process. The program content messages are a way to access these vairables at well defined locations within the program.

Program context messages contain information about the program execution. In the simplest case this information can be an identifier for the currently executing workingstep. In other cases users may want to include information about the workplan stack, the workpiece, the feature, the tool, the toolpath and the operation.

The program context messages should be programmed in sufficient detail to allow the location in the program to be unambiguously identified. In many cases the identifier of the workingstep will be sufficient. However, sometimes workingsteps are repeated at multiple locations within the program. For example, the steps for machining an impeller are often repeated for each blade. In this case you should include information about the workplan structure to make the location unambiguous, for example, there may be one workplan for each blade.

A proper program context will identify a unique location in the program. A knowledgable user can then access the program and get other necessary information. However, not all users will know, or care, about the details of the processes. For these users, the workpiece, tool or feature maybe more important, so a Broadcast allows these to be sent in the program context. An application can then listen for this content, and show the user, that the part is being made correctly without requiring him or her to know how it is being done.

Broadcasting Stations

This article describes API methods for making broadcasts and inserting them into AP238 programs. The broadcasts are added to existing objects that subsequently become known as broadcasting stations. If you look at an AP238 program the objects that have become broadcasting stations will have the string "[B]" at the start of their names.

Depending on the programmng, when a stations is reached a start broadcast is transmitted, and when the process is completed an end broadcast is sent. The time of the broadcasts is included in the messages, so an application can check that the as-ran execution time is within the range predicted when the AP238 program was constructed.

If there is an issue then more detailed information can be requested for the next time. Way points can be programmed by interval, time or location, and program content can be programmed to check on the values of key variables.

Digital Twins

Programming the broadcasting stations is the first stage of a procedure for making more accurate digital twins.

The second stage is to translate the content of the broadcasts into the codes that will be generated for each of the stations. See the Generate object for more details on how to program the translations.

The third stage is to run the program on a machine tool or robot. When the programs are running, the macro's will generate JSON messages that will be saved in a file, or transmitted across a network.

The fourth stage is to write a program that reads the JSON messages and uses the content to build more accurate, or timely, digital twins of the parts.

A note on identifiers

The identifier used for an entity instance in a STEP file is only persistent for one session. A message that has been programmed against a station will loose the station when the file is saved.

Therefore, stations should be identified by Universally Unique IDentifiers (UUID's). There identifiers are always unique and persistent. See the SetUUID() function of the AptStepMaker object for more details.

BroadcastBegin(), BroadcastProgramContextAdd(), BroadcastADF/CBM/CTL/PBF/ContentAdd()

	System::Int64 BroadcastBegin(
	    System::String ^name
	);

	void BroadcastProgramContextAdd(
	    System::Int64 bbc_id,
	    System::String^ selection
	);

	void BroadcastADFContentAdd(
	    System::Int64 bbc_id,
	    System::String^ selection
	);

	void BroadcastCBMContentAdd(
	    System::Int64 bbc_id,
	    System::String^ selection
	);

	void BroadcastCTLContentAdd(
	    System::Int64 bbc_id,
	    System::String^ selection
	);

	void BroadcastPBFContentAdd(
	    System::Int64 bbc_id,
	    System::String^ selection
	);

The BroadcastBegin() function starts a broadcast object so that it can be assigned to a station after it has been given context and content. If it is not assigned then it will be lost on the next file save.

The BroadcastProgramContextAdd adds program context to the broadcast. Multiple contexts may be selected by calling the function with different selections from the list below. For example to set the part context call the function with the selection argument set to "part", and to set the workplans call it with the argument "workplans".

The BroadcastADFContentAdd function adds assembly drill and fill content to the broadcast. Multiple contents may be selected from the list below:

The BroadcastCBMContentAdd function adds cutter based machining content to the broadcast. Multiple contents may be selected from the list below:

The BroadcastCTLContentAdd function adds composite tape layup content to the broadcast. Multiple contents may be selected from the list below:

The BroadcastPBFContentAdd function adds powder bed fusion content to the broadcast. Multiple contents may be selected from the list below:

Arguments

name:
The name of the broadcast which should be unique to this broadcast in case it needs to be used to find the broadcast at a later time.
bbc_id:
The identifier of the broadcast as returned by the Begin function.
Selection:
A string defining the context or content value to be added to the broadcast. Call the function multiple times to add multiple selections. Do not mix selections from two types of content in the same broadcast.

Related Functions

Common Errors

BroadcastFind(), BroadcastProgramContextGetCount/Next(), BroadcastADF/CBM/CTL/PBFContentGetCount/Next()

	System::Int64 BroadcastFind(
	    System::String^ name
	);

	System::Int64 BroadcastProgramContextGetCount(
	    System::Int64 bbc_id
	);

	System::String^ BroadcastProgramContextGetNext(
	    System::Int64 bbc_id,
	    System::Int64 index
	);

	System::Int64 BroadcastADFContentGetCount(
	    System::Int64 bbc_id
	);

	System::String^ BroadcastADFContentGetNext(
	    System::Int64 bbc_id,
	    System::Int64 index
	);

	System::Int64 BroadcastCBMContentGetCount(
	    System::Int64 bbc_id
	);

	System::String^ BroadcastCBMContentGetNext(
	    System::Int64 bbc_id,
	    System::Int64 index
	);

	System::Int64 BroadcastCTLContentGetCount(
	    System::Int64 bbc_id
	);

	System::String^ BroadcastCTLContentGetNext(
	    System::Int64 bbc_id,
	    System::Int64 index
	);

	System::Int64 BroadcastPBFContentGetCount(
	    System::Int64 bbc_id
	);

	System::String^ BroadcastPBFContentGetNext(
	    System::Int64 bbc_id,
	    System::Int64 index
	);

The BroadcastFind() function finds a broadcast object using its name. If there are multiple broadcasts with the same name, then a random one will be found.

The BroadcastProgramContextCount/Next() functions can be used to cycle through all the context seletions in the broadcast.

The BroadcastProgramContentCount/Next() functions can be used to cycle through all the content seletions in the broadcast.

Arguments

name:
The name of the broadcast which should be unique to this broadcast.
bbc_id:
The identifier of the broadcast.
Selection:
A string selecting the required context or content value of the broadcast. Call the function multiple times to access multiple selections. Note that these are the as-programmed values in the broadcast object. The as-ran values will be sent in JSON messages when the program is executed.
index:
The index when there are multiple selections.

Related Functions

BroadcastNameGet/Put(), BroadcastGetCount/Next/All()

	System::String^ BroadcastNameGet(
	    System::Int64 bbc_id
	);

	void AptStepMaker::BroadcastNamePut(
	    System::Int64 bbc_id,
	    System::String^ name
	);

	System::Int64 BroadcastGetCount(
	);

	System::Int64 BroadcastGetNext(
	    System::Int64 index
	);

	System::Collections::Generic::List^ AptStepMaker::BroadcastGetAll(
	);

The BroadcastName() functions set and get the name of a broadcast. For easier operation, each broadcast should have a unique name. The names "NEW" and "DELETED" have special meaning for the STEPNCExplorer.

The BroadcastContextGetCount()/Next()/All() cycle through all the broadcasts in a project. Broadcasts that are not being used will be deleted at the end of a session.

Arguments

bbc_id:
The identifier of the broadcast.
name:
The name of the broadcast which should be unique to this broadcast.
index:
The index when there are multiple broadcasts.

Related Functions

BroadcastingStation(), BroadcastingStationDelete(), isBroadcastingStation(), isBroadcastingStationType()

	void BroadcastingStation(
	    System::Int64 st_id,
	    System::Int64 bbc1_id,
	    System::Int64 bbc2_id
	);

	void BroadcastingStationDelete(
	    System::Int64 st_id
	);

	System::Boolean IsBroadcastingStation(
	    System::Int64 st_id
	);

	System::Boolean IsBroadcastingStationType(
	    System::Int64 st_id
	);

The Broadcasting() functions make, test and delete broadcasting stations.

The BroadcastingStation() function makes a station. The station may be an executable, feature, operation, tool, workpiece or toolpath. The bbc1 and bbc2 arguments set the start and end broadcast content for the station. They may be the same. If content is not wanted then the arguments should be 0. However, to make sure there is content at least one must be non-zero.

The BroadcastingStationDelete() function deletes a station. The underlying object of the station will remain in the program.

The IsBroadcastingStation() function returns true if the given object has been made into a broadcasting station. In this case the name of the object should start with the string "[B]" but this is not required.

The IsBroadcastingStation() function returns true if the given object can be given a broadcasting station. At the current time this means the object must be an executable, feature, operation, tool, workpiece or toolpath.

Arguments

st_id:
The identifier of the object that is to be made into a broadcasting station. The object may be an executable, feature, operation, tool, workpiece or toolpath.
bbc1_id:
The identifier for the broadcast that is to be the start content. Set to 0 if start content is not wanted.
bbc2_id:
The identifier for the broadcast that is to be the end content. Set to 0 if end content is not wanted.

Related Functions

BroadcastingStationGetCount/Next/All(), BroadcastingStationStart/End/Get()/Put()

	System::Int64 BroadcastingStationsGetCount(
	    System::Int64 bbc_id
	);

	System::Int64 AptStepMaker::BroadcastingStationsGetNext(
	    System::Int64 bbc_id,
	    System::Int64 index
	);

	System::Collections::Generic::List^ AptStepMaker::BroadcastingStationsGetAll(
	    System::Int64 bbc_id
	);

	System::Int64 BroadcastingStationStartGet(
	    System::Int64 st_id
	    );	
	
	System::Int64 BroadcastingStationEndGet(
	    System::Int64 st_id
	    );

	void AptStepMaker::BroadcastingStationStartPut(
	    System::Int64 st_id,
	    System::Int64 bbc1_id
	);

	void AptStepMaker::BroadcastingStationEndPut(
	    System::Int64 st_id,
	    System::Int64 bbc2_id
	);

The BroadcastingStationGetCount/Next/All() functions get all the stations that are using a broadcast.

The BroadcastingStationStart/End/Put/Get() functions allow the start and end broadcasts of a station to be changed or edited.

Arguments

bbc_id:
The identifier of a broadcast.
st_id:
The identifier of a broadcasting station.
bbc1_id:
The identifier of a broadcast that is to be start content.
bbc1_id:
The identifier of of a broadcast that is to be end content.

Related Functions