# How to use this script from ignition 7.9 to ignition 8.1 to load recipe

**URL:** <https://forum.inductiveautomation.com/t/how-to-use-this-script-from-ignition-7-9-to-ignition-8-1-to-load-recipe/84601>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 23, 2024, 12:05am UTC](https://forum.inductiveautomation.com/t/how-to-use-this-script-from-ignition-7-9-to-ignition-8-1-to-load-recipe/84601 "2024-01-23T00:05:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Rodolfo\_Mutuc](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jose\_Rodolfo\_Mutuc](https://forum.inductiveautomation.com/u/Jose_Rodolfo_Mutuc)\
**Post date:** [January 23, 2024, 12:05am UTC](https://forum.inductiveautomation.com/t/how-to-use-this-script-from-ignition-7-9-to-ignition-8-1-to-load-recipe/84601/1 "2024-01-23T00:05:10Z")

</div>

```auto
		
def loadRecipe(recipe):
	# Setup the command
	cmd = 'AE LoadSetup,' + recipe
	
	# Send the load request
	log.debugf('Issue recipe load for %s', recipe)
	resp = project.rasco.serial.sendCmd(cmd)
	
	return resp

```

```auto
def sendCmd(command):

	# Open Serial	
	try:
		open()
	except:
		log.warnf('Unable to open RS232 connection on %s', port)
		return False

	command = start + command + end
	system.serial.write(port,hello)
	log.trace('Wrote hello to RS232')
	try:
	
		x = system.serial.readUntil(port,ready,False)
		log.trace('Received ready from RS232')
		
		system.serial.write(port,command)	
		log.tracef('Wrote %s to RS232', command)	
		
		x = system.serial.readUntil(port,hello,False)
		log.trace('Received hello from RS232')
		
		system.serial.write(port,ready)
		log.trace('Wrote ready to RS232')
		
		resp = system.serial.readUntil(port,end,False)
		resp = "".join([i for i in resp if ord(i) in range(32, 127)])
		
	except:
		log.warnf('Failed to execute %s to RS232', command)
		close()
		return False
	
	log.debugf('Executed %s to RS232', command)
	
	# Close serial
	close()
	
	return resp

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 23, 2024, 12:16am UTC](https://forum.inductiveautomation.com/t/how-to-use-this-script-from-ignition-7-9-to-ignition-8-1-to-load-recipe/84601/2 "2024-01-23T00:16:38Z")

</div>

Split this topic on January 23, 2024, 12:16am UTC

A post was merged into an existing topic: [How can i uses this script from igniton v 7.9 to ignition 8.1 to load recipe](https://forum.inductiveautomation.com/t/how-can-i-uses-this-script-from-igniton-v-7-9-to-ignition-8-1-to-load-recipe/84598)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 23, 2024, 12:16am UTC](https://forum.inductiveautomation.com/t/how-to-use-this-script-from-ignition-7-9-to-ignition-8-1-to-load-recipe/84601/3 "2024-01-23T00:16:38Z")

</div>

Closed on January 23, 2024, 12:16am UTC


