Quantcast
Channel: Industrial Communications topics
Viewing all 338 articles
Browse latest View live

Sudo command usage in ssh

$
0
0

Hi i am working on a project to connect to a remote server via ssh and access the serial port of the remote server using minicom.

i have used libssh2 for making communication with remote server from my local machine. ls command is returning the list of files in the directory. but cd commands and sudo commands are not providing any response.

when i try to issue sudo ls or sudo minicom i am not able to get the response in my ssh channel window.

 

used the vi example from below link

https://github.com/fieldrndservices/libssh2-labview/blob/main/src/Examples/Single%20Command%20Execution.vi

 


communicating with a Rexroth CSH01.1C controller using the serial interface and LabVIEW

$
0
0

We have several Rexroth drives with a CSH01.1C controller. the only way to communicate with these drives is through the built-in serial interface connection X2. i need to build a VI that communicates with a drive, monitors some parameters and writes the values of these parameters to a file during the operation of the drive.

the documents for the drive indicate that there are two possibilities to do this: 1. use an ASCII-based protocol (no examples given, no telegram frame used, 8 bit No Parity 1 stop, or 2. use the SIS binary serial protocol (no examples given)

can anyone help me?

Low Modbus TCP streaming throughput using DSC IO server and Modbus API

$
0
0

Dear Sir,

 

I attached a demo project (LabVIEW 2019 SP1 + DSC 2019) to demostrate the streaming issue.

You can see it cost about 400 ms to stream the sin wave through 1984 input registers.

StreamLoopRate.png

You can run the two Master/Slave VI on the same PC to finish this loopback test.

Run slave first then run master, you'll see the time to finish the transmission is about 400 ms.

Do you have any good method to increase the data throughput?

 

Thank you

 

 

Deterministic communication between two (2) Industrial controller IC-3173

$
0
0

Hi,

 

I would like to communication deterministically between two (2) IC 3173. I'm already using an EtherCAT chassis 9145 with the first IC 3173. I thought I could add the second IC 3173 as a slave like the chassis 9145 but I can't.

 

I would like to use the same clock and transfer data at 4ms.

 

What are my option? No option with EtherCAT?

 

thank you.

Patrick

Problem connecting a cRIO as an EtherCAT master with a third-party EtherCAT slave

$
0
0

Hi,

 

I’m trying to use a cRIO-9038 as an EtherCAT master that connects with a third-part EtherCAT slave. However, the cRIO cannot seem to discover the slave device. It seems to be this exact problem, but the solutions there haven’t worked.

 

The slave device is the Ingenia Jupiter 20/80 EtherCAT Servo Drive (product manual). No C Series modules are being used to interface with it. An EtherCAT cord connects the second port of the cRIO to the Jupiter board. The Jupiter board is powered up and working correctly, with all the latest firmware installed.

 

The LabVIEW Real-Time software is the only software used (no SoftMotion or VeriStand). NI-Industrial Communications for EtherCAT 20.0 is being used. A new project was set up according to this NI document (with special emphasis on the section titled, “Adding Third-Party EtherCAT Slaves to NI Master Controllers” because the NI 9144 was not used). XML/ESI files were downloaded from the link at the top of this download page (version 2.7.8) and imported as described in the NI document. The entire folder of XML files was imported.

 

Some of the files gave the following error message when they were attempted to be imported:

cberg22_0-1623332625358.png

 

 

One of these problem files is named “DriveDict_0x10142.xml.” Since the 10142 is the slave device we’re connecting to, that could be a problem. 

 

As stated in this document (same as the first link), the XML files have been moved to the C:\Program Files (x86)\National Instruments\LabVIEW XXX\resource\Framework\Providers\indcomecat\DD directory. LabVIEW still says it cannot find the slave device. The error message and setup is shown below:

cberg22_1-1623332625361.png

 

 

If I click “New target or device” instead, the correct device shows up:

cberg22_2-1623332625359.png

 

 

When it’s added, variables show up in the Project Explorer:

cberg22_3-1623332625356.png

 

 

However, I can use this method to add other devices (NI 9144) that are definitely not connected to the cRIO. That makes me think that the XML files are there, but the cRIO cannot establish communication with the Jupiter board. Additionally, the Link LED on the Jupiter board that would light up to indicate an established link has never been lit. 

 

I’m at a loss, so any help is greatly appreciated.

Confusion between different protocols

$
0
0

Hi everyone,

I am a controls engineer at Satyam Mechatronics Pvt Ltd, I am in charge of designing the control system for packaging machine.

We use B&R products in the control panel so the part is very clear that we have to use B&R's Powerlink as a communication protocol.

But, when it comes to designing network involving robots and servos of different makes, I get really confused as to which protocol should I use.

Most preferably, I use Ethernet/IP for communication between PLC and Robots and EtherCAT when I want to make a machine which involves individual servo axes and motion control.

 

Can you suggest me whether my selections are right or wrong and how are other alternatives better in different cases?

IEC 60870-5 create a controlling station

$
0
0

Hi,

    I am using the NI Communications toolkit to create a IEC 60870-5-104 master station( Controlling station).

However, I did not find the toolkit to create a master station( Controlling station).

 

   Can any one help me out how to create a Controlling station using the IEC60870 toolkit in LabVIEW.

 

Thanks.

using PXI-8840 to communicate with EtherCat slave

$
0
0

Hi guys,

 

i'm always using a PXI Chassis (PXIe-1065) with a controller PXI-8840 for our projects. Now i'd like to use this controller PXI-8840 to communicate with our own EtherCat slave product. Is there any way to make this controller as a ethercat master, or is there any PXI-cards to make the communicate work? Thx a lot.

 

 

 


CompactRIO with GPS as Grandmaster ?

$
0
0

For en evaluation of an interesting project I need to know: 

 

Two CompactRIO systems are connected, one under water and one on land. The one on land should syncronize to the GPS time and act as a TSN master such that the one under water can sample sounds with a precision of +- 200 ns. 

I though to insert a GPS Module 9467 in the system on land and that this one would act as the grandmaster. I could not find out how this GPS module can sync the system clock. I just see that with timekeeper you can duplicate the GPS time on the FPGA. 

Is there a way to sync the system clock of the CompactRIO system to the GPS time with such a Module (9467) ? Maybe by routing the PPS signal to the trg input? Is there an example and timing precision measurements? 

 

 

 

C Series PROFIBUS Interface Module Unable to communicate With Slave when Master

$
0
0

Hi there,

 

We're trying to replace an existing PLC with a NI LabVIEW solution, one feature of this task is replacing the PLC's Profibus master functionality. After trying the following, we haven't had any luck:

 

  • Setup
    • We have a development machine with LabVIEW 2020 SP1 setup (with necessary FPGA dependencies) and the following VIPM packages:
      • Kunbus cRIO PB Master/Slave
      • Kunbus Configurator III
      • Kunbus Network Configurator
    • We have an NI 9149 ethernet chassis with a C Series PROFIBUS Interface Module installed in slot 1 with slot 2 free.
    • It is connected to the slave with the same cable that is used by the current PLC solution
  • Communication attempt using the FPGA low level Driver
    • We have successfully compiled and run the CS_cRIO-PB_DP-MasterExample(FPGA) on the NI-9149 in interactive mode. It can return values for the PB properties
    • If we run "Start/Stop DP-Master" command followed by a "read/write Data" command, we get the following message "0xC3 = DP Slave is not in DataExchange mode". This occurs for all slave addresses 0 through 127.
    • Are there any suggestions on next steps we can take to try and communicate with our Profibus slave?
  • Using Configurator III
    • We have used configurator III to setup a similar profile to what the PLC has implemented. 
    • To deploy the configuration, it seems that the configurator III application requires we discover the hardware through its Hardware Selection popup. If we click either "Search cRIO PB Devices" or "Configure Ethernet Devices" the Cseries card is not discovered
    • Are there any suggestions on next steps we can take to discover the hardware and deploy using the Configurator tool?

Any suggestions are appreciated. Thanks!

 

Kollmorgen EtherCAT Drive Flexible PDOs mapping

$
0
0

Is there an easy way or any ways to support Kollmorgen AKD EtherCAT drive Flexible PDOs mapping with LabVIEW?

 

What is LabVIEW doing with a fix PDO mapping that makes the drive aware of the PDOs it should use? Will it try to do the same for PDOs marked with "fixed=0" ?

 

Regards,

Danny

ABB FENA-11 Ethernet/IP protocol newbie

$
0
0

Hi,

I am trying to develop an application to communicate with FENA Ethernet adapter module with cRIO. My goal is to use TCP/IP communication to read and write data to ACS580 inverter. I am digging through FENA manual and can't find how to create communication frame to send or to read any data from inverter. Does anyone know what should I do, where can I find any examples, materials or something that will help me to control inverter from LabVIEW?

I know how to send/write simple data with TCP/IP but for now that's top of my skills.

I would be grateful for any informations and tips. 

 

Hardware:

cRIO-9038

ABB Fena-11 Ethernet Adapter module

ABB ASC580 inverter

IFM EtherCAT to IO-Link

$
0
0

I have an IFM AL1332 EtherCAT to IO-Link device that I am trying to integrate into a project.  I am successfully able to get it to load into the project but what I don't see is anyway to send data to the IO-Link ports.

 

FireflyAutomatix_0-1635272956027.png

 

I was expecting something like the BeckOff EtherCAT modules:

FireflyAutomatix_1-1635273028415.png

Does anyone out there have experience with adding Third party EtherCAT devices and can give me a few hints?

 

Problems with dynamic slave changes in newer Linux RT versions

$
0
0

Hello All,

 

as mentioned in https://forums.ni.com/t5/Industrial-Communications/Gracefully-handling-EtherCAT-slave-connection-and-disconnection/m-p/3652815 we are using the 'Refresh Modules' programmatic technique to allow the customer to add some specific slaves to a test setup on several cRIOs (904X, 903X) and record the data from these. This is running under NI CompactRIO 17.0.

Recently, we are upgrading the test systems to 20.5 (using the 'System Image' install method), and we found that this no longer works! If we now add new Slave devices, the system will not pick them up and error out instead:

Error -2147138412 occurred at Read Variable in DynamicModuleTest.vi Possible reason(s): NI-Industrial Communications for EtherCAT: More slave devices are responding to EtherCAT communications than the master expects. If you add new slave devices to the EtherCAT network after the most recent project deployment, add these new devices to your project and redeploy the master.

 

Now here comes the strange thing: if we update the cRIOs using the 'old' installation method to 20.5, this method works fine! But, if we do a fresh install of 20.5 using the old install method it also fails.

 

Summary:

  1. Installation of 'System Image' 20.5 - slaves cannot be added dynamically
  2. Installation of 'NI CompactRIO' 20.5 - slaves cannot be added dynamically
  3. Update from 'NI CompactRIO' 17.0 to 20.5 - slaves can be added dynamically

We've checked the running processes of case 1 compared to case 3 and did not find any major discrepancies (except from executables being in different locations in the file system).

 

I've attached a simple test program that uses 'Refresh Modules' and tries to read the variables from the detected slaves.

Matplotlib animation crashing when plotting data from NIDAQmx continuous read. NIDAQmx Python

$
0
0

TLDR: matplotlib animation crashing and not continuously plotting data from NIDAQmx read_many_samples.

 

Note: I am a new programmer and I've only been programming using Python for about 2 months so please excuse me if this is a basic question.

 

I am creating a control system in Python by combining PyQT5, Matplotlib, NIDAQmx, and multiprocessing.

I want to continuously read data from an NI DAQ and then plot the data as an animation. I have separated this onto separate process from my user IO and opened up a new window, separate from the main GUI. However, when I run the code, the animation window opens and I begin to see some plots for about half a second before the window crashes. The main GUI stays open though, because it is on a separate process.

I have included the problem file here for reference. This class gets called in from a main function in a different file.

 

I believe the problem originates from the animate function. Specifically:

      self.y1data.append(get_data.values_read(6)[1])
      self.y2data.append(get_data.values_read(6)[2])
      self.y3data.append(get_data.values_read(6)[3])
      self.time = datetime.datetime.now()
      self.target_time_new = self.time + datetime.timedelta(seconds=self.t)
      self.x = self.target_time_new       
      self.xdata.append(self.x)

I wanted to just access the first row of data in the values_read numpy array get_data.values_read[0,:] but unfortunately, I was getting a "builtin_function_or_method' object is not subscriptable error" so I changed it. I put the "(6)" because I figure that I have 6 sensors so the shape of the array was going to be 6 rows? Feel free to tell me if that is incorrect. I was not able to find much information on the subscriptable error and numpy arrays. Mostly because I am not sure if this is because I don't understand buffers properly and how they store data or if I don't understand how numpy arrays work. Most likely both.

This code is a very large project that is still a work-in-progress so excuse the unfinished comments and sloppy work.

 

 

 

import numpy as np import nidaqmx from nidaqmx import constants from nidaqmx import stream_readers, stream_writers from nidaqmx.stream_writers import AnalogSingleChannelWriter from nidaqmx.stream_readers import AnalogMultiChannelReader from PyQt5 import QtCore import datetime from time import sleep import sys # INPUT globals and constants NUM_CHAN = 2 FS_ACQ = 1651 # sample frequency T_MED = 2 # time to acquire data # OUTPUT globals and constants BUFSIZE = 200 BUFSIZE_CLK = 200 Nu = 1E-06 TOL = 1E-3 # to compare for setpoint currently. This will be # removed when the control system is implemented RATE_OUTCFG = 1000 RATE_CALLBACK = 200 global STREAM global COUNTER COUNTER = 0 class get_data(): """ A class used to receive and plot data from sensors . . . Description: Attributes ---------- Methods ------- data_gen(): Generates simulated data to use as an example for animated chart animate(data): plots the data as an animation (moving chart) TODO: Fix Doc String """ in_task = nidaqmx.Task() #Add a Current Analog Input channel from ai0 in_task.ai_channels.add_ai_current_chan('cDAQ1Mod1/ai0:5', min_val=0, max_val=0.02) in_task.timing.cfg_samp_clk_timing(rate=FS_ACQ, sample_mode=constants.AcquisitionType.CONTINUOUS,samps_per_chan=(T_MED * FS_ACQ),) samples_per_buffer = int(FS_ACQ // 30) # 30 Hz update values_read = np.empty def __init__(self): """ TODO: Fix Doc String """ import matplotlib.pyplot as plt import matplotlib.animation as animation # interactive(True) #used to set ASCR to in_stream to allow for reading data from a #single channel self.reader = AnalogMultiChannelReader(self.in_task.in_stream) get_data.in_task.register_every_n_samples_acquired_into_buffer_event(1000, self.input_callback) get_data.in_task.start() #Initialize 'data' variable as an empty array self.data = np.empty self.inputs = [] # Create a figure and initialize 2 rows, 3 columns self.fig, ((self.ax1, self.ax2, self.ax3), (self.ax4, self.ax5, self.ax6)) = plt.subplots(figsize=(12,8), nrows=2, ncols=3) # line1 and line2 initialized to be plot on subplots self.line1, = self.ax1.plot([], []) self.line2, = self.ax2.plot([], [], color='r') self.line3, = self.ax3.plot([], [], color='b') self.line4, = self.ax4.plot([], [], color='g') self.line5, = self.ax5.plot([], [], color='c') self.line6, = self.ax6.plot([], [], color='m') # concatenate the two data lines into one variable self.line = [self.line1, self.line2, self.line3, self.line4, self.line5,self.line6] self.time = datetime.datetime.now() self.target_time = self.time + datetime.timedelta(seconds=60) #self.x = self.target_time # set axes for both plots for ax in [self.ax1, self.ax2, self.ax3, self.ax4, self.ax5, self.ax6]: ax.set_ylim(-1.1, 1.1) ax.set_xlim(self.time, self.target_time) ax.grid() # Display gridlines on plot # Data point for the 'line' variable self.xdata, self.y1data, self.y2data, self.y3data = [], [], [], [] # animation for a dynamic chart anim = animation.FuncAnimation(self.fig, self.animate, self.data_gen, blit=True, interval=0.1, repeat=False) # Show the animation plot plt.show() def input_callback(self, task_idx, event_type, num_samples, callback_data = float): get_data.values_read = np.zeros((6,1000), dtype= np.float64) self.reader.read_many_sample(get_data.values_read, num_samples, timeout=constants.WAIT_INFINITELY) self.inputs.append(get_data.values_read) #print(get_data.values_read[0,:]) return 0 # function to generate simulated data def data_gen(self): """ TODO: Fix Doc String """ self.t = 0 cnt = 0 while True: #cnt < 1000: #cnt+=1 self.t += 0.1 # self.y1 = self.inputs[0,:] #* np.exp(-self.t/10.) # self.y2 = self.inputs[1,:] #* np.exp(-self.t/10.) # self.y3 = np.exp(-self.t/10.) # adapted the data generator to yield both sin and cos yield self.t # self.y1, self.y2, self.y3 def animate(self, data): """ TODO: Fix Doc String """ self.t = data # self.t, self.y1, self.y2, self.y3 = data self.y1data.append(get_data.values_read(6)[1]) self.y2data.append(get_data.values_read(6)[2]) self.y3data.append(get_data.values_read(6)[3]) self.time = datetime.datetime.now() self.target_time_new = self.time + datetime.timedelta(seconds=self.t) self.x = self.target_time_new self.xdata.append(self.x) # axis limits checking. Same as before, just for both axes for ax in [self.ax1, self.ax2, self.ax3, self.ax4, self.ax5, self.ax6]: xmin, xmax = ax.get_xlim() if self.t >= xmax: ax.set_xlim(xmin, xmax+datetime.timedelta(seconds=60)) ax.figure.canvas.draw() # update the data of both line objects self.line[0].set_data(self.xdata, self.y1data) self.line[1].set_data(self.xdata, self.y2data) self.line[2].set_data(self.xdata, self.y3data) self.line[3].set_data(self.xdata, self.y2data) self.line[4].set_data(self.xdata, self.y2data) self.line[5].set_data(self.xdata, self.y2data) return self.line # self.line,

 

 

 

 


Ethercat Error 2147138393

$
0
0

Hi All,

 

We have an ethercat network with the master device being a PXI-8101 with a ethernet card configured for ethercat, then we have 4 slave device: NI 9144, 2xCosworth ESG16 units and a beckhoff EP4174-002. We are getting the following errors occassionally.

-2147138393 - Network communication failed. Ensure that all devices are physically connected to the real-time controller and that the devices are powered on.

 

We have replaced all the hardware and cabling but we are still getting the error, does anyone have any ideas what to try? or does anyone have any suggestions on how to diagnose the issue.

Many thanks,

Mich

 

PCI Profibus DB9 connector pin definition

$
0
0

Hi

We need to design a cable and assembly it on NI PCI profibus card(Part Number: 780160-01) DB9 connector. Are there someone that know the pin definition of the DB9 female connector on PCI profibus card?

It would be great help, thanks.

Is it possible to lock down a Modbus communication port?

$
0
0

Good afternoon,

 

I have a piece of equipment, a solar charge controller that advertises to be able to communicate with it over RS-485 Modbus (2 wire).

 

I have been trying to connect with this thing unsuccessfully for some time now and the company I bought it from is offering no support.

 

They claim that the only way to communicate Modbus with this charge controller is through wireless access point that plugs into the RS485 port and encapsulates the Modbus into the wireless access point and can only be viewed by a phone app.

 

Is it possible to lock down Modbus like that over a serial connection? I was under the impression if it was a serial port that if you wired it up correctly and used a Modbus API that you could communicate with the device? Never heard of anyone locking down an open standard like Modbus proprietary to their wireless device.

 

field service software

$
0
0

The service manager provides the most effective field service software that you can use to help your business in so many ways such as scheduling, dispatch, monitoring, customer support, invoicing and more.

Our consultancy team can arrange a comprehensive analysis of how TSM Evolution should be configured to work best within your business processes

LabVIEW library for Molex SST-DN4-USB DeviceNet master, is it possible?

$
0
0

Hi,

 

What's the latest on the SST-DN4-USB? It looks like I would wrap functions the dnscan32.dll, as described in

5136-DN/5136-DNP, DeviceNet Scanner Module / 32-Bit DLL API, Reference Guide, Version 2.21, to create a LabVIEW library for this device.

 

Has anyone done this, does this work? Are there LabVIEW VIs available for this? How many man hours did it take to get it working?

Thanks,

Chris C.

Viewing all 338 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>