Torq

Torq is our AI-powered assistant that can help you build models in ProtoTwin. Some examples of things that Torq can help with are:

  • Writing and explaining code.
  • Explaining how to configure components.
  • Creating scripted components, tools and value converters.
  • Creating scripted robot programs that are executed by the integrated robot controller.

Coding Assistant

Torq is integrated into the script editor, where you can ask Torq programming related questions.

Simple Instructions

You can ask Torq to generate short code snippets for you:

  • How do I reparent an entity?
  • How do I animate the color of a material?
  • How do I find all the top-level entities in the model?
  • How do I turn a conveyor off when a sensor is blocked?
  • How do I create a sequence that commands a motor to cycle through a list of positions?

Torq can also help you create entity/camera animations, tools and scripted logic for robots and machines:

  • Write a component to animate an entity up and down.
  • Write a tool that applies a force to a body with physics.
  • Write a scripted robot program that alternates moving between two target entities.

Advanced Instructions

You can also provide Torq with detailed instructions. When provided with a detailed specification, Torq is capable of writing control logic for machines and robots.

Create a scripted robot program that cyclically:

  1. Moves to the 1st target
  2. Waits for a sensor to be blocked
  3. Moves linearly to the 2nd target
  4. Activates the suction grippers
  5. Moves linearly to the 3rd target
  6. Releases the gripped object

Write a component to control a pallet layer former. There are 3 sensors: inputSensor, outputSensor and endSensor. The conveyor should be turned on when the inputSensor or outputSensor is blocked, otherwise the conveyor should be turned off. When the endSensor is blocked, then cleared, set the state of the actuation controller for the pusher to true, wait until the pusher reaches a position of 1 meter, then wait for half a second, then set its state back to false.

Write a component to control a 3-axis gantry:

  1. It should have a property for a list of positions
  2. It should move the axes of the gantry to each position triplet in parallel
  3. It should have a short delay between each movement, which I can configure through the inspector

You can ask Torq follow-up questions if the generated code does not work the first time, or if the query was misunderstood. In general, Torq performs best when you provide detailed instructions or a detailed specification of requirements with a clearly defined scope. Avoid making open-ended or vague requests, such as: “write a component to control my gantry” or “write the control logic for my machine”.

Help Assistant

Torq is also integrated into the main editor of the application and the documentation page, where you can ask Torq more general questions related to ProtoTwin such as:

  • How do I model a SCARA robot?
  • How do I simulate a conveyor belt?
  • How do I disable collisions between two objects?
  • How do I create a graphics material?
  • Why do my joints break apart?