03-09-2010 07:33 PM
I have written a VI usingNIMODBUS.llb to communicate with a VFD drive.
Now, I want to write in particularbits of a register of slave device (VFD).
See Attached table:
Now I'm using "MB SerialMaster Query Write Single Register (poly).vi" (See attached file), I set"Address" to 5 and I think i have to set "Holding register"for different bits.
When I set the "Holdingregister" to "0", it works fine.
But when I set the "holdingregisters" to 1 or 2.. I don't have the correct output!!!
03-18-2010 01:29 PM
Hi,
I notice 2 things.
1. When the motor stop boolean is true, I assume that you want to stop the motor. Shouldn't you put 1 into the register to set bit 0 in order to stop the motor? However, instead of putting 1, you put 0. Is there a reason for that?
2. You are doing a lot of VISA close inside a loop, while you initialized the VISA session outside the loop. After the first iteration of the loop, your VISA session is closed, so you can't do read/write again after the first iteration.
Yik