Multiple Serial Instances? | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Multiple Serial Instances?
August 28, 2015
7:51 pm
Avatar
threelock
Member
Members
Forum Posts: 5
Member Since:
August 5, 2015
sp_UserOfflineSmall Offline

I have an application where I am trying to use multiple serial ports on a Mega 256 to communicate between the computer and a serial device. My intent is to use the USB/Serial interface with the computer for development and debugging. I've eliminated all of the code except opening and closing the comm ports, 0 and 1. I receive the following error:

1.0.0.18, Arduino Mega or Mega 2560
Loading configuration...
Initializing packages...
Preparing boards...
Verifying and uploading...
temp:14: error: redefinition of 'HardwareSerial* _Serial [4]'
temp:12: error: 'HardwareSerial* _Serial [4]' previously declared here
redefinition of 'HardwareSerial* _Serial [4]'

Is this not possible, or am I doing something wrong?

Thanks!

August 28, 2015
8:58 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Hi threelock,

Thank you for bringing this to our attention.  This is definitely supposed to work, however, it looks like a change made in Version 1.0.0.17 is causing the compilation error.  I have created Case 118 for this issue.  We will address this in the next release, which will hopefully go out in 1-2 weeks.

In the meantime, a possible workaround would be to install version 1.0.016 and see if your VI compiles.

Also, the problem does not occur between any combination of serial ports that does not include the default one (e.g. 1 and 2, 1 and 3, etc.) but Im sure you probably need the default port for the PC interface.  If you are hardware savvy, you could also jumper another port's TX/RX lines to the RS-232 transceiver on the board by removing these resistors and tapping them in here.  

Mega-UART.pngImage Enlarger

Steffan

sp_PlupAttachments Attachments
August 28, 2015
9:33 pm
Avatar
threelock
Member
Members
Forum Posts: 5
Member Since:
August 5, 2015
sp_UserOfflineSmall Offline

Thank you for the quick reply. The downgrade worked. Now I can effectively scan for wifi networks with my $5 ESP8266!

August 28, 2015
10:22 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Ok great.  If you haven't registered already I would recommend doing that as you will receive a notification when the next release is available.  This issue has been resolved and will be included in the next release.

September 22, 2015
3:53 am
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

FYI, version 1.0.0.19 has been released which resolves Case 118 above and should be available for download on the LabVIEW Tools Network and VI Package Manager in the next few days.  See here for complete release notes.

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
3
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356