To solve this problem, we first need to define the decision variables and the objective function. Let's denote the amount of money invested in the textile industry as \(x\) and the amount invested in the telecom industry as \(y\). The total investment is $500,000, so we have \(x + y = 500,000\).

The return on investment (ROI) for the textile industry is 6%, or 0.06 in decimal form, and for the telecom industry, it's 8%, or 0.08 in decimal form. The objective function to maximize the total return is \(0.06x + 0.08y\).

The family wants to invest a minimum of 30% of the $500,000 in the textile industry, which translates to \(x \geq 0.3 \times 500,000 = 150,000\), and at most 50% in the telecom industry, meaning \(y \leq 0.5 \times 500,000 = 250,000\).

Now, let's formulate this problem in a way that can be represented in Gurobi code:

- Decision variables: \(x\) (amount invested in textile), \(y\) (amount invested in telecom)
- Objective function: Maximize \(0.06x + 0.08y\)
- Constraints:
  - \(x + y = 500,000\) (total investment constraint)
  - \(x \geq 150,000\) (minimum investment in textile)
  - \(y \leq 250,000\) (maximum investment in telecom)
  - \(x, y \geq 0\) (non-negativity constraints, assuming investments cannot be negative)

Here is the Gurobi code to solve this linear programming problem:

```python
from gurobipy import *

# Create a model
m = Model("Investment_Optimization")

# Define decision variables
x = m.addVar(lb=150000, name="textile_investment")
y = m.addVar(ub=250000, name="telecom_investment")

# Set the objective function
m.setObjective(0.06*x + 0.08*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(x + y == 500000, "total_investment")

# Optimize model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Textile Investment: ${x.x:.2f}")
    print(f"Telecom Investment: ${y.x:.2f}")
    print(f"Total Return: ${0.06*x.x + 0.08*y.x:.2f}")
else:
    print("No optimal solution found")
```