To solve this optimization problem, we first need to define the decision variables and the objective function. Let's denote the number of packages of LED lightbulbs as \(x\) and the number of packages of Halogen lightbulbs as \(y\). The profit per package of LED lightbulbs is $30, and the profit per package of Halogen lightbulbs is $50. Thus, the objective function to maximize profit can be written as:

\[ \text{Maximize} \quad 30x + 50y \]

The constraints are based on the time required for each type of lightbulb on both machines and the total available time per day (500 minutes for each machine). 

For the plastics machine, it takes 6 minutes to make a package of LED lightbulbs and 9 minutes to make a package of Halogen lightbulbs. Therefore, the constraint can be represented as:

\[ 6x + 9y \leq 500 \]

Similarly, for the wiring machine, which requires 12 minutes per package of LED lightbulbs and 10 minutes per package of Halogen lightbulbs, we have:

\[ 12x + 10y \leq 500 \]

Additionally, \(x\) and \(y\) must be non-negative since they represent quantities of products.

Now, let's translate this into Gurobi code in Python. We'll use the `gurobipy` library to define our optimization problem:

```python
from gurobipy import *

# Create a new model
m = Model("Lightbulb_Production")

# Define the decision variables
x = m.addVar(lb=0, vtype=GRB.CONTINUOUS, name="LED")
y = m.addVar(lb=0, vtype=GRB.CONTINUOUS, name="Halogen")

# Define the objective function: Maximize profit
m.setObjective(30*x + 50*y, GRB.MAXIMIZE)

# Add constraints for plastics and wiring machines
m.addConstr(6*x + 9*y <= 500, "Plastics_Machine")
m.addConstr(12*x + 10*y <= 500, "Wiring_Machine")

# Optimize the model
m.optimize()

# Print the results
for v in m.getVars():
    print(f"{v.varName}: {v.x}")

print("Objective:", m.objVal)
```