It is not clear what everything is in your wiring diagram, so I’m not certain what you are doing. Are you using a mechanical relay for motor control? That is not going to be able to switch on & off fast enough to control speed. If the transistor is your “relay”, then it might work, but you want to use PWM output pin to control the transistor on/off for speed control.
The h-bridge node is assuming you have an h-bridge controller for the motor. The DR & PWM pins on the h-bridge need to be set to the pin numbers you’ve wired the h-bridge to. If you are just using a relay or transistor for motor control, then you don’t really need the h-bridge node.
The output for analog-read is between 0 & 1, so there is no need for the max node, and the less node comparing it to 500 will always be true.