LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling hardware automatically via modbus control

Hey guys, Im in a bit of a bind. Im looking to switch in my power supply via modbus control. I am using an ADAM-4068, so for instance if i switch the first relay the dc power supply will be on with a voltage level of say 230V, il the second relay switches i want to switch off the dc power and switch in ac power. The ADAM-4068 has 8 relays where i want each relay to control  a piece of hardware. The voltage level is controlled by parameters in the database. I am using the modbus vi library serial master query write multiple coils, But my question is(i am quite new to labview) how can i automatically control the modbus to switch the particular coils to switch in the power supplies. I am lso looking to use the ADAM for communication to a PLC.

 

Please any advice helpful.

 

Damien

0 Kudos
Message 1 of 6
(3,235 Views)

User Manual, appendix G , section 10, has the coil details

0 Kudos
Message 2 of 6
(3,222 Views)

Thanks for the reply, i have that manual. I know my slave address and starting address in the vi. I can run the vi and it communicates to my ADAM no problem. However I have to manually index the array and press the button before i run the vi so select which relays to turn on or off. But my question is how do i control which button/relay is pressed automatically and how would i inturn use that switch/relay to switch in my power supply. For example for my first test sequence relay 1 switches and switches in 100V on DC power supply, next sequence the 3rd relay switches and my AC power switches in or my DMM. I am very inexperienced with labview. So any advice at all is much appreciated.

 

Thanks

 

Damien

0 Kudos
Message 3 of 6
(3,219 Views)

I would start with Chapter 4 in the manual and use NI-MAX to see if you can send commands/receive responses from there succsessfully.  Learn also how to do basic serial port communications in LabVIEW.  Lots of good stuff in this forum as well as in the LabVIEW examples.  Then you should be good to go.  🙂

.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(3,208 Views)

Hey Billko thanks for the reply.

 

With the command set in chapter 4 I believe it only works if the ADAM-4068 is in the ascii protocol state when i use the ADAM 4000-5000 utility software and Ni-MAX, however i have to change the protocol to modbus for labview. I have communicated serially to each of my hardware devices, power supplies/DMM etc. I can control my ADAM-4068 using the NI.modbus vi "MB Serial master query write multiple coils" for example I put in my slave address and my starting address the mode is RTU but what I am attempting to do is automatically control the vi instead of manually indexing the coil and manually pressing the push button for on/off.

 

As i said i am only starting to use labview so my experience is very limited. I believe i need to use a serial init.vi along with the MB Serial master query write multiple coils. But how do i use the result i.e that coil one is switched to connect to my power supply??thanks

 

Damien

0 Kudos
Message 5 of 6
(3,198 Views)

It's called using the Modbus VI's as subVI's and wiring in different values to the connectors of the subVI to change the address and the value of True vs. False.

 

It seems to me that you need to take some basic LabVIEW tutorials to understand how to use subVI's.

LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 6 of 6
(3,171 Views)