Experimenting with chatbot ChatGPT for programming a digital twin of a production
Can ChatGPT ( https://chat.openai.com/chat ) write Tecnomatix Plant Simulation #PlantSimulation SimTalk code? – Not yet but it looks like it is only a question of time and training.
The result is truly amazing!?
Question to ChatGPT:
Please write an exit control in SimTalk code for Tecnomatix Plant Simulation to move a movable unit to station2
This is the answer by the ChatGPT bot, (including a nice answer, what it means!):
This code uses the "on exit" control in SimTalk, the programming language used in Tecnomatix Plant Simulation, to trigger a movement of a movable unit from Station1 to Station2. When the movable unit exits Station1, the code first checks if Station2 is free using the "isFree" function. If it is, the code then checks if the movable unit is available using the "isAvailable" function. If both conditions are met, the code moves the unit to Station2. If Station2 is not free or the movable unit is not available, the code will display a message indicating the reason for not moving the unit.
Note: This is a more complete example, however it is important to define the movableUnit, Station1, and Station2 in your simulation model and also check if the movable unit is in the correct location before moving it.
So yes, the answer is (still?) wrong but the structure is clear, detailed and for me very promising.
And what else can AI do for you?
If you don’t understand code, someone else wrote, or if you like a detailed documentation: Ask your friendly chatbot to add some lines of explanations:
e.g.:
GPT please try to add comments on the following code:
waituntil not self.~.Empty and self.~.IsReady
for var x := 1 to self.~.XDim
???????????????var mu := self.Location[x,1].Cont
???????????????if mu /= void
??????????????????????????????self.~.IsReady := false
??????????????????????????????var targetAngle := 180 - (x-1) * 360/self.~.XDim
??????????????????????????????wait self.~._3D.playRotation(self.~.currentAngle, targetAngle, 10)
??????????????????????????????self.~.currentAngle := targetAngle
??????????????????????????????wait 2
??????????????????????????????mu.move
领英推荐
??????????????????????????????waituntil mu.~ /= self.~ -- Wait until part has left
??????????????????????????????self.~.IsReady := true
??????????????????????????????return
???????????????end
next
And this is the AI answer:
Or if this is too long and too detailed:
GPT please briefly summarize the meaning of the SimTalk control:
waituntil not self.~.Empty and self.~.IsReady
for var x := 1 to self.~.XDim
var mu := self.Location[x,1].Cont
if mu /= void
self.~.IsReady := false
var targetAngle := 180 - (x-1) * 360/self.~.XDim
wait self.~._3D.playRotation(self.~.currentAngle, targetAngle, 10)
self.~.currentAngle := targetAngle
wait 2
mu.move
waituntil mu.~ /= self.~ -- Wait until part has left
self.~.IsReady := true
return
end
next
Is summarized by the OpenAI ChatGPT:
This SimTalk control is a script that rotates a 3D object by a certain angle and then waits for a specific event to occur before continuing. The script waits until the object is not empty and is ready, then iterates through a range of values (x) from 1 to the object's X dimension. Within the loop, the script assigns a variable (mu) to the contents of the object's location at the current x and y value. If the contents are not void, the script sets the object's IsReady status to false, calculates a target angle based on the current x value, rotates the object to the target angle, waits 2 seconds, moves the contents (mu), and then waits until the contents are no longer in the object. The script then sets the object's IsReady status to true and exits the loop.
Nice isn't it?
I'm eagerly awaiting your comments
be happy
1 年Nice. Simtalk is still a big challenge for this chatbot to write code. However, I think it is very helpful in adding comment for our reference to debug. Anyway, I pay more attention on the way of asking a right question to ChatGPT leading to a right answer. Thanks for posting interested topic.
Digital Solutions Architect & Consulting
1 年Very interesting. This could provide massive value to the customers of Siemens Industry Software... replacing the need for expert users! Though, intimidating I must admit... myself being apt with the use of the tool, I feel at this stage in my career, it is my key technical competency and took me over 4 years to master (even now I am learning). Matthias Heinicke and please, anyone else feel free to contribute (Ajay Balakrishnan) - Compare this advancement in technology to that of the 'rise of automation within manufacturing'. This provided massive value to the businesses and customer, increasing quality and output, but decreasing costs, however, automation was and still is a concern for workers in manual operations. All being known, there are still positives for the worker; there are more higher skilled jobs and businesses are upskilling to support these advancements, and so workers are supported to grow with the organisation, whilst securing higher paid jobs. So my question: What is the value for the worker? In this case, the key technical users of these softwares? What support is in place to ensure that they are being upskilled to cope with the rise of machine learning and training tech like ChatGPT?
Siemens | Research & Development | Motion Control |
1 年Brilliant!!!
Senior Simulation Manager at LEGO System A/S | Discrete Event Simulation | Manufacturing Optimization
1 年We tested it yesterday with similar results. It is for sure going to be an area of interest. E.g. how to ask the right question to not just get 42 back. ??
Senior Simulation Manager at LEGO System A/S | Discrete Event Simulation | Manufacturing Optimization
1 年André Agertoft Condamine Anders Magaard Koldby