First, you posted to the wrong board. As it says, this is NI Product Boards>Digital-Multimeters.
Second, your query is just wrong. You cannot makeup the commands. As the manual states, if you want to know the currently selected function, you issue the FUNC? query. You get a timeout because the instrument has no idea how to parse the illegal command.
Third, why are you writing your own code when there is an existing driver?